> "good managers" are incredibly thin on the ground
True, but that should be a problem to solve, not an excuse (for the industry at large). Are companies providing leadership training? Are they trying to find out if a managerial candidate is actually "good" (by whatever definition they choose)? Are they evaluating the existing managers and trying to prevent problems before they start? Are they treating their managers as resources to be invested in or scapegoats?
There is a bit of chicken/egg there (they need to be good managers of their managers), but overall you can't expect to get what you aren't trying to get. If the incentives are to work on big projects to pad your resume and point fingers when they fail, you have an incentive to CREATE big projects, and an incentive to treat coders et al as someone to start building a blame narrative for in case it is useful.
I've had great managers and terrible ones. The great ones maintained a long view (don't overcommit, understand tech debt, know people are human) and would fight for you, whether that meant talking with upper management or having a hard talk with you. The terrible ones assumed their job was to assign work and chide are threaten as needed. The great ones would ask for details to understand, and only occasionally raise concerns. When they did, they brought their concerns to me first, to ask what I thought should be done. The terrible managers would also ask for details, but it was to micromanage. The great managers appreciated all their staff, even the troublesome ones, and viewed their job as finding the best point of mutual happiness between that employee and the company. The terrible ones mentally (or more) divided people up into "poor", "acceptable", and "great", and then showed favoritism to the greats and disdained the floors.
One constant for both, however, was that the managers that thrived at any given company were decided by the incentives the company provided, be they financial, cultural, or social.