This is just one of the problems with a monarchy. Succession can go smoothly for hundreds of years, and then suddenly you have a bad heir who's about ready to start a civil war if things don't go well. If they pick the 2nd Prince, and there's still enough support for the 1st prince, such as by vassals that have already sworn oaths to him or have ongoing deals with him, then you're looking at the 2nd Prince having to squash rebellions for the next couple years, which is even better when you live in a world that has the constant threat of monsters popping up.
The only way to fix this is for the Prince's rep to fall even further on its own that any vassals wouldn't ally with him anyways (but this in turn harms the kingdom's legitimacy as a whole) or for the prince to have an unfortunate accident.