I'll concede at the very outset that this is just never going to happen; I just think it should.
The concrete? ... er ... specific ... details have been working well for years, now, in the Republics of Autonomia (no, no really, I waive the poetry prize) and are as follows: every state of these countries
has the right of confederation, but Autonomia has a conflicting right of union.
Last year Oddballia had yet another confederation referendum, and yet again managed to gain the required 70% of the vote (the high percentage being ia. protection against dead hands ruling from the grave), and finally the federation voters failed to raise the 55% required to sustain a refusal of cecession in this case (higher federation percentages being needed to trump greater support for secession). Oddballia is now in a confederal union with Autonomia, and if the secessionists can sustain enthusiasm for their cause, perhaps in 50 years time they'll have taken another step in that direction. However next year the unionists in Oddballia will be asking for a return to how things were, and it's quite possible that the wisdom of the longer view proves to be in their favour.
So whatever function is devised to give effect to this, has two variables instead of one, and provides lots of time for mature reflection / no "quick political profits".
The principle is that the locals own their region. It doesn't belong to central government; it doesn't belong to the neighboring government; it belongs to the people living there. Freedom of association is the only basis for cobbling the little territories of the world together, and if you build in the kinds of protection against stupidity like the above, the principle would become implementable.
Payoff? Less war and rumours of war.