Is there any work on how best to protect young /​ emerging democracies from becoming autocracies?

I’m aware that some EAs consider promoting liberal democracy to be a priority.

I think that newly democratic countries or countries transitioning to democracy are most at risk of becoming autocracies, and so resources put towards promoting liberal democracy will have the highest expected value in this context.

Is there any academic work on how resources can be best used to ensure that transitions to democracy take place successfully /​ new democracies are protected from military coups?

If not, I think it may be valuable for someone to study what made historical transitions to democracy successful or unsuccessful, and what made historical governments more or less likely to be overthrown in a coup.

(I had these thoughts in the context of the ongoing coup in Sudan)