I'd just go a more humane yet stricter step and put down capital punishment for convicted child rapists.
Castrating someone is slightly too barbaric.
It wouldn't even put a full stop to the problem.
Castrated people are still loveually active. Why do you think some men in married families will be castrated?
It's to stop them from having children.
They can still have love, want love and enjoy love.
It would do nothing in regards to preventing a paedophile from wanting to have love with a child.
The only benefit castration would even have is likely lost on a paedophile as the child wasn't necesarilly likely to get pregnant anyway. Either being too young or the wrong gender.
And beyond paedophiles continuing to be able to have love with children, it wouldn't prevent such things as grooming or setting up paedophile rings.
This punishment does nothing to stop paedophiles and is just a way of making yourself happy in the light of another persons suffering.
Therefore it's just sadistic.