As a 28 year self employed veteran, who hopes he is always allowed to be so, I agree with your assessment. Even though I’m a software developer, one still works off inspiration. We are artisans/craftsman.
One thing I have found is programming requires at least a four hour time block or half a day. In that, problem solved or not, I have done enough to move on to a different problem. If learning a new skill, I can time block in single hours over time.
The worse thing is squirrel brain and flitting from one thing to another, getting nothing done.
In addition, we pay four our insurance, vacations, sick days, retirement savings, etc.
I love it, but it’s not for everyone.