The solution to that isn't to only work on the stuff that pleases you, though. It's to only work for companies that have traction or at least demonstrated consumer demand. It's the founders' job to validate that there's a reason for the company to exist; make sure they've actually done their job before you entrust them with yours.
Also, I regret not having delegated some of those boring and shitty tasks, since they would have developed skills in my staff (like debugging under difficult environments) that would have made them stronger and more independent developers.
A personal anecdote: I have recently discovered I was bored on a job because the tech lead, after working with a dozens of engineers who considered cleanup and simplification tasks boring and wanted to implement new features, stopped parcelling out those and kept them to himself, while distributing new functionality tasks (which I don't personally enjoy doing 40 hours a week) throughout the team.
I honestly hope it will not happen because you seem like a great Lead, but you can't say this scenario is not a possibility.