Simply create a system where it is impossible for a singoe person or faction to have enough power to do this kind of harm, and be constantly vigilant against any erosion of the safeguards.
It’s extremely simple when said in this way, but it’s also nearly impossible in practice.