Paraphrasing from Plato's The Republic, when the rulers and their auxillaries raise children with proper balance in the body and soul, there will be no need to deliberate on what is the right legislation, for the legislators themselves will be just in their duties.
In the end of the day, we need proper education, not only in technical excellence, but also societal awareness, what it means to be good and how to uphold oneself to such a standard even if everyone around them does not. This is how you defend against the men with guns.