Personality Reprogramming And You
Let's say we're in the future, and technology has advanced. How far ahead from the present is anyone's guess.
There's a case where someone is proven to have committed many violent crimes. Psychological analysis of the defendant reveals that they're a victim of a mental disorder that predisposes them to perform such crimes. They can't be treated using "conventional" methods, so the judge sentences them to be psychologically reprogrammed. This involves the physical structure of their brain being altered, and results in the editing and/or removal of any current memories, thought processes, etc. that would encourage them to commit violent crimes again.
Do you believe that this sentencing was ethical?
Please explain your answer, and feel free to venture into sub-topics.