I advocate the latter. Prison is quite the drain on national resources.
And yes, castration (presuming not fully emasculated) is no barrier to what an evil mind can conceive to do.
Castration means “cut off”, not snipped. There will be next to no testosterone production. End of issues.