Some lawyers are more than just people that get paid to extricate you from
jail a tight spot: they are business counselors who have a lot of experience in business negotiations. Used wisely, that sort of thing can be the difference between a profitable software consulting business and “scrape by / beer money,” because a good
expert in the field can help you see what’s worth pursuing and what’s likely not to be worth the time and/or the risk.
My lawyer is like that. I pay a periodic minimum fee for access to his expertise: “use it or lose it.” If he has to spend more time, he tells me in advance. Since I am not buying his priority time, sometimes I have to wait a little bit.
The “customarily obvious only in hindsight” point is to structure one’s business dealings in advance such that they are both profitable and protected, and go into any deal fully-informed. (Or, make the judgment call not to enter into the deal at all.) You can’t avoid what you don’t know to avoid. Therefore, engage someone who does. As an expert yourself, hire experts.
If you literally cannot afford an attorney, I definitely recommend that you read the various books by the late Hermann Holz (nee “Herman Holtz” or various other Americanized spellings) about consulting contracts. No, I still return to: “find a way to afford an attorney,” as well as other qualified business advisors. Given that you are in this business, you are in the business of providing expensive(!) professional services, and/or of providing work-products with a very large inherent-liability risk.