As I've heard before, founding a company is like marriage without the sex. You really are legally bound together, as well as emotionally and socially (to a lesser extent).
As you'd expect, founder divorces can get messy.
I think it is best for founders to discuss it before they start the company. Hash out the exit plan, have those hard conversations, write it all down and agree to it. Sign it, then put it away, start building the companu, and hope you never have to use it.
But if you do; if people's situations or desires change, then you've got the path forward for an exit. You don't have to make one up on the fly after the company is worth something and emotions are high.
Source: been a founder, been a team member who watched some founder divorces from a distance