I've done both - built a software product and company around it, as well as consulting (including some big projects like one processing $1B/mo in payments).

>>how do you manage the stress of income unpredictability<<

By squirreling away as much as I can from those "feast" times.

I've found many people I meet on fixed incomes who haven't been through the "feast or famine" cycle you mentioned don't appreciate just how hefty a safety net it takes to feel secure. I keep seeing naive guidance out there in the range of months, where personally I was looking out in terms of 1-2 years (or more). It necessitated significant sacrifices when I was starting out, in terms of disposable income, homeownership, etc. I was young, so my personal needs were really frugal.

>>do you find it sustainable long-term<<

A few things that helped make it sustainable (this is looking back in retrospect - it's not like I was deliberate about sustainability at the time as I was busy trying to make a living, build up a reputation and fiscal capital, and most importantly make cool new things):

- Personal flexibility in terms of scheduling 'vacation' time. Got a couple months without anything on deck? Great, spend 6 weeks catching up on work you let slide while you were insanely busy on the last consulting gig, then take two off and travel or do something else to recuperate. I always struggled to be 'truly' disconnected, but clients tended to recognize how hard I work to make them happy and were supportive (i.e. tried to be a little more self-sufficient while I was away) - and it's still possible to have a great trip while checking in from time to time (I recall a couple weeks in Boracay where I'd be on email all morning then kitesurf in the afternoons).

- Innate satisfaction from pleasing clients and from building new things. Money isn't the only reward out there to hit your dopamine. You already mentioned diversity in projects, which falls in the same vein as this.

- Being open to long workweeks when times are busy. It's not a clock, it's about achieving the objective (have logged 80+ hours for weeks at a time - if you're excited about and deeply committed to the work it's not as bad as it sounds). Billing hourly or some other remuneration arrangement that leaves you feeling compensated for your time is really important here.

- Exercise - find a physical activity that helps burn off your stress.

- A bit of hubris around selectivity. Don't get a warm fuzzy feeling from this lead? That's fine, skip it and look for a different opportunity. I think the sense of control and agency here is something those at regular day jobs sometimes miss. Of course it takes going through some crap projects to get to where you can recognize and filter on the good ones.

- Reputation. A lot of the stuff that was hard at first becomes easier once you're established and can leverage a network of thrilled customers and partners. I don't advertise anymore, and get more opportunities than I can handle from word of mouth. I turn down more work than I take on. (Of course as you grow, you get a new and different set of hard challenges to tackle).

I toyed with having employees on the consulting side, but as I worked with larger clients I unexpectedly found it sometimes worked better to "commandeer" staff directly from them for a project (especially if you've got buy-in at the C-level). One thing I've learned is I much prefer working with a small, talented and focused team than an 'army of mediocrity', and lately have charted course back into the product realm.

>>or is it more of a stepping stone<<

Everything we do in life is a stepping-stone to where we'd like to be. Some stones give way, some hold unexpected surprises when you turn them over. One way or another you're going to get your feet wet.