I have spent almost no time on other people's payrolls (other than 1Y as part of a buyout) and have made it to semi-retirement with money in the bank, so avoiding 9-5 absolutely can be done.
Here is stuff I did:
So a bunch of consulting/contracting and start-ups.
Drop me an email if I can help more.
I am, unfortunately, too old to start a PhD right now.