Go work for companies you like. There are plenty of good people out there making useful software. Or make your own opensource software and put your effort where your heart is.
It’s easy in our industry to burn out doing commercial work with no soul. But it’s not the only kind of work out there.
I worked for a large unethical company in the US that worked to emulate big tech, and took a page out of Jack Welch's playbook (stack ranking etc). I was miserable working there and thinking of changing careers.
I ended up moving to New Zealand and working for a small civil engineering firm that has developers to write internal tools that are used by the engineering team to process their data. The technology I'm working with is a lot more dated, the development processes aren't sophisticated (there are 0 meetings and no attempt at project management) and I took a real pay cut, but I genuinely feel that the software I'm working with is beneficial and has a net positive impact on the world, no matter how small. There is also no on call and I work exactly 37.5 hours a week, on top of all of the workplace culture differences in NZ.