In a different vein you could find a company to work for more inline with your goals. Probably with a paycut.
https://80000hours.org/job-board/?role-type=engineering&role...
https://80000hours.org/job-board/?role-type=engineering&role...
I've always enjoyed programming and never had any job I absolutely hated. But I've never really felt excited about the mission of my employer before and it makes such a difference in my daily attitude and motivation. I can really get behind the "teach a man to fish vs. give a man a fish" approach we take. I think it also helps that the results of our efforts directly impact the community I live in vs. a change the world type vision that a large corporation would have.
On top of it all, I got a nice raise to come here, especially when you include the benefits package. So don't resign yourself to the fact that you'll have to take a pay cut.