It's a tough nut to crack, I do agree. On one end of the scale you have labor incentive systems that are overly associated to (perceived) performance, which can produce much misery, inequity, and arguably reduced productivity - toxic stack ranking, the 2014 amazon NYT article, 996 Taylorism, etc.
On the other hand you have systems that you describe that are not at all calibrated to performance, and only care about seat time. Such as, toxic school systems or government agencies.
But, somewhere in between, there is a tremendous amount of happiness, equity and productivity. Such as, the customer service representatives that have worked for Amazon in Germany in the same roles since 1998. Or, airline pilots who, setting aside the various labor and equity troubles for a second, get great performance results from a seat-time oriented approach. Or someone that happily worked as a dishwasher at a restaurant in Rome for 20 years. In USA there's also a good deal of civil servants that have faithfully served our local societies for decades with a high quality of labor and life. The USPS mail person that delivers to my parents' house has been running that route for like 2 or 3 decades, he's still great at it and spends as much time playing with my parents' dogs as he wants.
I don't know what the perfect formula is, but I do think it involves outpacing inflation for compensation increases regardless of performance, and some amount of performance evaluation too. But maybe not too much of either.