Some possible solutions:
1) Ask for a 30 hour work week, or find a company that can offer this. Your salary should still be high enough to aim for a comfortable retirement at 65.
2) Adopt a more frugal lifestyle and increase your savings rate.
You need to save a few million dollars to retire with $40-$80k in investment income. It should be very possible to do this with a backend developer's salary over a period of 10-15 years, and then you should be able to retire in your 30s or 40s. You should also aim to increase your salary by changing jobs every few years (or get a job at a FAANG.)
3) Build side projects or a startup and try to get some passive income (or an exit)
Write all your startup ideas down and keep looking for opportunities. It can be hard to build products in the evenings or weekends, especially if you're already burnt out from your normal job. So this option works best when combined with part-time freelance work:
4) Become a freelancer and work part-time while you work on your own projects
Bonus: Move to a place with a very low cost of living.
Working 10-20 hours per week gives you a lot of free time and much longer weekends. But it also gives you a lot of time and energy to work on your own ideas.
Note that working 10 hours per week is a terrible idea if you just spend the rest of your time working on hobbies that don't make any money. If you do that, then you won't even be able to retire at 65, and you probably won't be able to save money for emergencies. Only do this if you spend the rest of your time trying to build a business.
If you can't get anything to work after ~10 years of trying, then you should still have plenty of time to go back to a full-time job and save for retirement.