Staying in academia is a decent idea (I'm not sure if this is different in Europe vs the US). Lots of parents I know at my kid's school work part time for universities due to the same requirements around schedule flexibility.
Working as a freelancer is a decent idea as well, due to the autonomy you'll retain, but the amount of time you'll spend on the business aspects of it could be substantial.