I think you have far more leverage than you think in most places still.
I encounter plenty that used a for loop when something else would have been advisable.
In some sense this is true, but in my view it's not whether a person theoretically has leverage or opportunity, but whether it's feasible to practice or to explore it. If enough people believe that programmers shouldn't have leverage, and in-practice if there's only negative repercussions from trying, then it's not meaningful. Broadly, in any profession, it seems like it comes down to a whole lot of luck whether you have real, practicable leverage. Barring some exceptions for somehow intentionally positioning oneself to be solely responsible for an uncommonly important system in an uncommonly lucrative business, but that seems to me to also be dependent on a lot of luck.
Overall, it seems that if you really have leverage, you effectively can't economically be replaced, and everyone knows it, but otherwise you'll be on the chopping block for not doing exactly what your narcissistic boss wants on a moment to moment basis.
This sounds like a job for unions. It would have been advantageous to have formed and joined them before so much power was lost, but it's easy to be shortsighted when you're happy and comfortable with where you are and ignore that the situation could easily change, if not for you then for the next generation. Companies are happy to leverage every advantage they have against workers. Unions can be a powerful tool for workers, one that could help solve a lot of problems current and future, and it's sitting there just waiting to be used.
...and often the amount more isn't catastrophically more, so they don't even think about it. The company might be bleeding from paper cuts, it might be terribly unhealthy because of it, but still not unhealthy enough to kill it.