I'm late in my career, but about 25 years ago after exiting a horribly toxic and low-paying job, I made the decision to only work for nonprofits for the remainder of my career. Now don't get me wrong, a nonprofit can be just as high-stress and low-paying as any for-profit company. They are often strapped for resources and focused on finding donors – which is much like any sales job. But at least at the end of the day, you know you (hopefully) did some good. And you definitely know your labors weren't just to make someone else rich.
Nonprofits are more likely to need and appreciate skilled labor. If you are good at what you do, you will likely be told how much you are respected and appreciated. Unlike for-profit companies, where their financial activities are usually opaque, nonprofits are required by the IRS to have certain levels of transparency. There are websites that make it easy to do your research. https://www.charitynavigator.org/ is particularly good at showing you how much of their budget goes to doing what they say they do.
You won't get rich at a nonprofit, but larger nonprofits have pay structures that aren't too shabby. After all, they have to compete for talent like any other business. I work for a larger nonprofit and feel I am well-paid for the work I do. In my case, we have an amazing work culture that emphasizes work-life balance. Not with lipservice, but actual benefits like up to 6 weeks PTO. And not PTO you are promised but can't take. I am actually encouraged to take my PTO.
Anyway, that's my advice for “sticking it to the man.” Work for a nonprofit.