Throwaway to protect identity of myself and the company.
I am considering a principal engineering role at an early stage startup. They have raised low single digit millions in seed, they have an opportunity to raise more at low-to-mid 8-figures valuation. Not much revenue yet, but my impression is they have a strong deal pipeline coming with prospective clients lining up to sign. Just one problem, their core tech is a disaster. To the point I don't think they are confident they can provide acceptable service to new clients until they re-architect much of their existing platform.
This is where I come in. I have a niche background that is extremely relevant to their problem space. Their technical cofounder who designed the initial platform has pretty limited experience and is not in a position to chart this course without someone else taking lead. So I would rearchitecting and refactoring most to all of their platform.
Delivering the next gen platform will be critical to the future of the company. This actually makes the opportunity more interesting to me. On the otherhand, I know I would resent the technical cofounder receiving an enormous financial benefit from developing a non-viable disaster from which the company needs to be rescued.
How do I negotiate a situation where I can receive the value of what I provide?
If the technical cofounder created a working prototype that allowed the company to achieve certain milestones (e.g. paying customers, seed funding) then I'm not sure why you'd be resentful because it seems the (initial) job was accomplished.
You rightly point out that you bring a valuable contribution to the table, but it seems you might (possibly) be underestimating how capable and determined the founders (and their investor network) will be able to source somebody else to rearchitect the platform.
If you're one of the few luminaries in your niche, then feel free to start negotiating for a large compensation package that includes serious equity or favourable provisions. If on the other hand you feel that there could be others that could rearchitect on a "good enough" basis at a (potentially) lower compensation price point, then perhaps you might want to lower your expectations walking into the initial negotiation.
Either way, it intuitively feels that your expected negative emotional resentment is not the right frame to start evaluating the possibilities around this opportunity.