Why do you think schadenfreude is a negative personality trait or a personality disorder? It is just a name for a specific emotional state. It seems perfectly apt here.
Schadenfreude is taking joy in someone else's suffering.
Justice is taking joy in the meting out of suffering to people who deserve it. People argue about who deserves what, and laws and justice systems exist to manage those arguments. But the idea of righteous retribution for a wrong is pretty close to universal, and looks like schadenfreude to me.
"Two wrongs don't make a right" and all that.