"Ethical" Is a tricky term. I believe that it was probably the most sensible and humane of the options given. The justice system as we know it now is supposed to be "rehabilitating" criminals in jails, not that they make much of an effort, so I believe that this form of rehabilitation can be useful and safe. It's also dependent on how much of the person's core structure that you change. If you only remove the "bad" parts, but leave who they are as a human being, then yes. But if you're taking who they are and COMPLETELY changing it, then I don't think that it should be allowed.