Both fail the simple "Is the harm done greater than the harm averted?" test.
If you must cause harm to stop harm you have either broken even (self-defense). However, in contradistinction to that, if you have initiated it, you have tipped the scales.
I don't see the castration argument as much different. You will, no doubt, save lives. Castration is not life threatening, it is a somewhat temporary inconvenience. If what you are after is "saving" lives, it will do exactly that. There will be fewer deaths by STD's and incidentals (tainted blood supplies, abortions, unwanted pregnancies and overpopulation).
The rebuttal has perfectly valid points given the same logical axioms as regulation.
If you have to choose between 2 harms, take the less harmful one and you are ahead. For example, if you have to choose between a blanket prohibition on nukes and a risk of people using nukes for personal reasons, the blanket prohibition is essentially harmless while the use of nukes is destructive. Its a very easy choice.
Castration on the other hand is a greater harm than a STD so again the choice is very easy. Same applies to slavery.