But we've never really conceived of an equivalent "Rule of Law" for reputational attack: both epistemically, to decide whether someone is actually guilty, and proportionally, to decide what is the proper social punishment and the appropriate path to redemption.
What's more, the internet has vastly increased the power of reputation attack, for better and worse: it's good that it's more difficult for an actual sexual predator to skip town and offend again, but bad that someone unjustly accused (including of lesser crimes) cannot restart their life. Instant world-wide communication has introduced a super-weapon, like going overnight from spears to aerial bombardment.
I frankly have no idea how we would go about constructing a Rule of Law for shaming. The distributed, bottom-up nature of the phenomenon is one of its strengths, able to act nimbly to respond to cases that the Law cannot; and each person's ability to make their own assessment of the character of others (including outsourcing that intelligence to the crowd) is a non-negotiable component of individual freedom, the Liberal Enlightenment tradition, etc.
But none of that changes the fact that every tweet can now carry the social equivalent of a tactical nuke. If we don't find a way to solve that problem, however imperfectly, we'll have to learn to live with a certain degree of unjust collateral damage, both to individuals and our social infrastructure.