is this a job or a business? will it make money while you are sleeping? if not, its a job. A business should buy you free-time. Keep in mind most (non scientific gut feeling) business strike lightning at the 10-12 year mark with multiple pivots.
When you feel down about work try to feel up about something else such as a sport, relationship or hey start another side gig. I currently have three irons in the fire and some could argue I should focus all my time on the biggest one.. thats not me. I like the chase. So I found partners to help me carry the load so that I can do the parts that I enjoy.
"I'll target small companies that might not have the resources to hire full-time people."
I know this is not the question but IMO dont target this group. There are bigger companies that dont hire for a variety of reasons and money is not one of them. They rather spend on outsourcing than in-house. You will be much richer targeting these folks. The hard part is getting an "IN" but worth it. You only need a few of these clients and your set.
Network before starting this at local meetup.com
Second, dont come up with solutions in an ivory tower (on your own). Find your first client and they will have not shortage of automation tasks they are ready to pay for.