The vulnerability of a democracy to a demagogue who would do things like run on a platform of "elect me and we'll take Taiwan back by force", has been known since the Ancient Greeks. At least in the American system, the solution has been to "separate" those powers so no one individual or small group can exercise them, forcing a consensus. You see this still working even today, with Trump, whose the most demagogue-like president in memory. He's mostly foolish talk, since most of his actions have been held in check by the courts or his inability to get legislation passed.
A tendency towards deadlock has been the major failing and problem of American democracy (at least in recent memory), as I see it. I don't really see a good democratic solution to it either, besides reversing course back towards a more decentralized republic with a weaker central government.