That's basically what I've been doing. I'm not convinced that's the only possible way, which is why I asked. Working on pointless projects is fine for a short period of time (at least for me - I tried that approach multiple times in the past), but a potential source of burnout in the long run...
Have you considered taking a pay cut to work more full time but at a company that you think is doing valuable work? There are a lot of companies trying to "change the world", surely one lines up with your values. Though sometimes the skills they want are more specialized than generic software development (which is what I have :( ).