Why would it be a deterrent? People constantly go on about severe punishments being deterrents. How much crime was there, though, when virtually all crimes were punishable by death? Lots, is the answer. No-one who is a criminal is going to be deterred by severe punishments, for all sorts of reasons:
- They think they aren't going to be caught, so what does it matter if the punishment is severe?
- They don't think about or don't know of the punishment anyway, so it can't deter them;
- As sick as it may sound, I think it's likely that some of these people don't even realise what they are doing is even wrong. If you are doing nothing wrong, why fear punishment?
- Even those who do not what they are doing is wrong probably don't care, anyway. Nothing would deter or stop them.
- Finally (at least as much as I can think of) if some crimes are a spur-of-the-moment thing again little thought will have gone in to the consequences.
The biggest deterrent is usually not the severity of the punishment, but the likelihood of being found out. That will at least stop some wannabe child abusers from doing so. But no amount of castration will do anything to stop the problem.