Therefore it's ridiculous to say OP deserves a % of revenue/profit/equity of their co-founders next venture. There's no legal or ethical basis for negotiating this.
But from the OP it sounds like the cofounder might be continuing in the same line of business, but wants to "pivot" and jettison the now-dead weight of the technologist.
If this is the case it seems plausible that his contributions and R&D are still relevant, even if they're throwing out his code, and so perhaps he's entitled to whatever stake he vested over those first two years.
If the co-founder is taking just knowledge, best-practices, know-how, and life experience, then the other co-founder does not have any legal basis to expect anything.
If the new venture is actually completely separate (or no more related than "In the process of trying to launch business X and failing, I realized that a very different business Y would be more profitable"), then yes, I agree with you.
As for the code, I wouldn't touch it after the original company ceases. The code belongs to the entity that created it and when its gone, the code is gone. If you start something new from this code and it becomes successful, guess who is going to come out of the woodwork and want a portion of it? Yes, the same guy who likely would deny you anything from his new venture.
I've been in this situation and when you've written so much code, and it's good. It's painful to separate from it. I also flip houses and there are times when it's time to just sell the house already and I almost feel sad that I'm not going to get to work on it anymore. Sometimes I feel remorseful that I won't get to see all my good work after its sold. But here's the thing, if I don't sell it, I won't replenish the capital I need to do more. And in the software sense, if I don't move on from a project after its done, I will continue to mentally and physically labor on a work that is producing nothing. And if it does do something, you'll forever be looking over your shoulder for that cofounder who will sue you for a portion of it.
All this said, there are a couple of alternatives you can consider.
#1 is to simply agree with the founder that the company should open source the code base. This gives you the benefit of letting future employers, cofounders, coworkers, etc seeing your work. And this benefits him too as being associated with the project. it puts a coda on the project so that the work you did doesn't just disappear into vapor.
# 2 you should consider both signing separation agreements and put it in writing that everything is over and there are no claims on work product, intellectual property, etc.
This is literally the reason lawyers exist. It’s not hard to draft up an agreement where the former co-founder transfers all rights and ownership and relinquishes any claim to the technology.
Exactly and this market validation has value for the "new" company. It's also not clear whether or not OP got paid during their two year jolly.
Depends on whether the cofounder is using the current company's assets towards the next venture (and it seems like the answer is no, so there is really no basis for that ask).
Just because your startup is worthless doesn’t mean you get a percentage of your cofounders next business. That’s ridiculous.
The business's legal entity is being shut down and closed. The OP only has claim over assets of that business. If he agrees to certain assets being given to the other partners, he has no claim for the future use of those assets.
The business's legal structure is being closed and shut down. OP only has claim over how the assets of that legal structure are distributed.
If his partner goes on to start a new business in the same niche to do the same thing, legally and ethically there's nothing he can do or claim.
Companies are so keen to keep their own code, but most don't realise it would be useless to anyone else.
The more you know...
Yikes, it sounds like you are walking away here with virtually nothing.
If I were you, I would fight for ownership in whatever is next for your cofounder. If that means it is a Shopify store, that is fine, but you should get X% of revenue, profit sharing, something out of this.
The code you have now is ultimately worthless and is not a good 'payment' for the time and energy you invested into this company.
I do not think the current arrangement you have outlined is in any way fair.