I did it for a few years, and blew through all my savings in the process.
Had to start an actual business, LLC, and deal with all the parts that as an engineer I absolutely hate.
Had done about 15 years in the industry with a small tech company, had all the skills, leads, etc, and wanted to do it on my own.
Way underestimated how much time and effort the running of a business part takes, and while I had projects, I didn’t have the time to do them right, payment was always late so my profit shrank, and I burned out in two years.
Hired an admin to help with managing the projects and clients, but it was too little too late.
I’m not saying don’t do it, I’m saying be sure to have all those other elements well in place, cause the actual time spent programming was pretty small.
In the end I took a role as the on site guy for a very large company, making decent money, and I’m back doing the parts I enjoy.
Best of luck to you.
Motorcycle, bass guitar, kitten.