I can’t stop anyone from doing something I don’t like.
But historically, there have been plenty of solutions to stop someone from doing something society doesn’t like. For example, execution. Torture. Punishing their relatives. Exile. Prison. And asking them nicely to please stop.
Of those, I think prison is the best option. Putting someone in a cage may seem wrong, but letting them freely murder and rape innocent people is more wrong.