That is a bit shortsighted way to look at value added for being part of a startup. Experience and an elevated role can increase earning power regardless of the start-up outcome.
I think you're either overestimating the value of experience and title gained at a startup, or undervaluing the same at established companies, or possibly both.
Having a role at a startup doesn't automatically imply useful experience has been gained, or that the specific position and duties are somehow more solid than equivalent roles at established companies.
You're assuming this evaluation is from the point of view of someone early in a programming career. If you've already got a bunch of experience, and had elevated roles, the cost benefit analysis is going to be different.
Having a role at a startup doesn't automatically imply useful experience has been gained, or that the specific position and duties are somehow more solid than equivalent roles at established companies.