I've often wondered what compels a person to deliberately want to hurt a stranger. It seems so odd to me. I can at least get my mind around why someone might want to put down an abusive ex-husband, for example. But a stranger? The stranger never did anything at all to them. What gain is there in life to cause harm to someone who hasn't even been met?
I think the only thing I can come up with is that the person in question feels unhappy for some reason. They see others around them who are happy and they feel even worse in comparison. So they seek to damage the other peoples' happiness. And then maybe they feel a sense of "Hah now they're unhappy just like me, we are in this together". So it makes them feel a little better, to think they're not alone. And since that dose of "feeling better" was fairly easy and effective, it trains them to do it again.
And in a way that sort of makes sense. If that unhappy person started abusing an actual sister or mother, there'd be consequences. But abusing a stranger, there are few consequences. So they get the "benefit" with little "danger".
So I would think one way to prevent it is to remove their reward. Their aim is to make the person unhappy. If it's demonstrated that the targeted person is still just as happy, and that this activity has no effect, maybe they will move on and try something else, like actually addressing whatever root problem is making them unhappy.