First, there will be those who are devoted to the goals of the organization.
Secondly, there will be those dedicated to the organization itself.
The Iron Law states that in every case the second group will gain and keep control of the organization. It will write the rules, and control promotions within the organization.
If you want to change the company from within then you are almost certainly dedicated to the goals of the organization and they are falling short, but it is loyalty to the organization itself that gets you clout. So in order to change the company, you first have to do the thing that you want to change, like cutting corners to meet a deadline. Only after you've kissed the ring will you be given power. This means that unless you are able to perform a revolution or coup within the company (maybe by unionizing), you will always be subordinate to its rotting fish head. If you want to change the company, the best way you can do that is by joining a competitor with better leadership and out-competing or being that leadership at a competitor.
Being a subordinate to people you don't respect is going to demoralize you, demotivate you, disempower you, and make you lose respect for yourself until you cannot function as a person.
CGPGrey's summary of the dictators handbook is also quite relevant: https://www.cgpgrey.com/blog/rules-for-rulers
If you want to make a change, your only option is to get into a position of power, be subject to the same corruptive forces as the incumbent, and choose to be responsible instead of selfish, which is fundamentally an act of self sacrifice. His discussion of the video is way more thought provoking than the original video itself, IMHO: https://www.youtube.com/watch?v=ILvD7zVN2jo
The short answer: you can’t, but you can change which parts of the world you actively engage with.
As someone on a long journey that seems highly relevant to this thread, getting help via therapy is one of the most important things I’ve done for myself.
A job that has sufficient problems and insane levels of stress can make the rest of the world look…different. Quitting my job gave me the mental capacity to find and see aspects of the world around me that are not worth quitting.
It has given me the space to recenter my life on things that support me, and to regain some optimism about what I can do with my life more broadly.
Quitting a toxic environment is an important first step. There are good places left. Good people to work for. Different ways to live life.
Choosing suicide is often related to a deep belief that there are no options left. This is often a result of compromised thinking based on intensely difficult situations/experiences that make it extremely hard to see beyond the current situation. I’ve had periods of dark thinking that I’ve since learned how to manage, and one of the most important things for me was getting a broader perspective on what was happening (and thus possible) outside of my own sphere.
If you are obsessed about quality, don't work at QA at big MBA-run corporations, just don't, thats a place for career-chasing folks. Find a place that appreciates and values your, or change your job altogether.
I know it sounds harsh but just look at this topic where it can and very often leads to (as long as the story checks, and nobody here actually knows).