Unless I misread the Constitution, it contained nothing to prevent the south from succeeding or render doing so illegal. The founders didn’t consider the possibility. Until 1865, the notion that Union was inviolable was not set in stone, as it is now. States rights were a given, except in the few constraints the Constitution mentioned directly.
I don’t know what should have happened. The trajectory of events in the early 19th century seems to have made the war inevitable. The political issue of slavery goes back at least to the three fifths compromise that made the constitution acceptable to the south.
But slavery was, no pun intended, a black and white issue. No compromise was possible (though many were tried) that could span the chasm between freedom and bondage. The US was born the proverbial house divided against itself. It could not stand and it didn’t.