How do you keep the balance so that you can afford to do what you do without feeling you're getting screwed or demoralized?
Depends on what your program does, the companies and people involved, and many other variables. One thing you can be sure of is that you will lose some control over the program. They're not going to spend a bunch of money only to let a programmer with no business sense (their perspective, not mine) get in the way of marketing.
As for other alternatives, I recommend reading The story of Snort, it might give you a couple ideas.
Update: Also take a look at Software Libre and Commercial Viability.