There is a substantial school of thought which holds that a benevolent moral code is the first line of defense against evil. A society's broad moral code being usually derived from an underlying religious attachment.
True, but I don't see that any underlying religious attachment is required - it is rooted in religion's attempts to provide answers to the unknown, long ago, and peoples' willingness to accept those answers, because no one else was stepping up. A lot has changed in the centuries since, but religion hasn't. Except to splinter off into numerous factions, whenever this group disagrees with that group, ie: Lutherans, Calvinists, Methodists, Baptists - and that's just the Christians.
I'm thinking our best hope against the evil that men do is to study the human brain, until someone can figure out why sociopaths and pedophiles exist. I believe that's where the answer lies, and it hasn't been found yet, like so much else about the brain.