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!