How did Taiwan get so lucky?

Taiwan did get lucky in one respect. Most countries that get saddled with corrupt, violent, kleptocracies tend to repeat the cycle over and over again. The elites observe what the invaders did and, upon re-emerging, copy it wholesale. South Americans have been doing it since the Spaniards showed them how. Half of Africa since time immemorial (although with a bit of a leg-up from the British, Belgians, Dutch … etc).

Bizarrely, Taiwan managed to transition from being ruled by a bunch of vicious clowns to a more-or-less functioning government and legal system within a couple of generations, or at least one that delivers a manageable level of corruption and incompetence. That’s quite an achievement, and off the top of my head I can’t think of any other country that’s managed to do that quite so quickly, successfully and painlessly.