This was always an issue in Rome. People were afraid their heirs would turn out to secretly be wannabe dictators, and you couldn’t do anything about it since you were dead. How would you go about making sure your heir was as close to your vision as possible, both outwardly and in their desires should they be emperor?
Anything I could do to make sure my heir continued on with my vision would not be guarunteed, and it would only be temporary. As the saying goes, you’re putting all of your eggs in one basket, from one ruler to the next.
A more permanent solution would be to overhaul the current system and setup checks and balances so that no one person could have too much power.
You could divide up power between an Executive Branch, a Legislative Branch, and a Judicial Branch. Then you put in place like-minded groups of people in each of those branches and voilà.
Flawless!
I forget which king it was (I’m sure someone here will tell me) but his solution was to divide his kingdom among his two heirs.
So the idea was that one heir would do the dividing and the other heir would then pick which kingdom they wanted.
This is a great solution to making sure people share a cookie / snack / etc fairly. The divider has an incentive to keep things as fair as possible.
I think this ended in civil war though, so your mileage may vary