Electrotherapy (ETC) is actually used to treat severe depression, sucidal thoughts/behaviors, bipolar (mania/depression), and schizophrenia (Catonia). This treatment is also sometimes used in Dementia and pregnancy. This is usually used when medication doesn't work, the patient has had ETC before, or the sufferer needs the effects immediately because they can pose a threat (to self or others) in the time it takes the medication to take effect. This is all done with consent of the patient and possibly family.
Usually the patient is given muscle relaxers and asleep (anesthetic) before hand. While they sleep the device is placed on their head and a controlled electric current is used producing a brief brain seizure. The patient usually doesn't remember the producer and is carefully monitored and is repeated three times a week.
Side effects: Temporary confusion, retrograde amnesia, temporary nausea, headache, muscle ache and medical complications.
(www.webmd.com, www.mayoclinic.org, www.mind.org.uk)
If you've seen/read whatever anything with Arkham Asylum or the inmates chances are this treatment has been show or referenced. This makes sense as ETC is still used today and I'd be lying if I said that none of the inmates need it. However personally I don't think it's shown/done correctly.
The staff apparently missed the part about the patients being asleep during the procedure as patients laughing (Joker) seem to be a common occurrence. Also how Sparks seem to fly while it's happening when that would probably kill or at least fry the brain. Another thing is how the patients are strapped down, something I didn't mention was that the Patient is LAYING DOWN not sitting in a freaking chair!
Arguably Arkham may not even ask the patients for consent (which kinda makes sense it'd be weird to just have a page of a comic having an inmate sign paperwork). Another thing is which rogues get the treatment I'm no doctor/psychologist/ therapist whatever so I can't say if a certain rogue needs it or not.
If I'm seeing this correctly then it makes a lot of sense so many inmates are not getting better and are always eager to escape. Hell I bet Bruce Wayne and Batman have quite a few things to say to the staff at Arkham.
Sadly whenever it's shown in the Batman universe it looks like it simply feeds into the public opinion of ETC which is a shame because even though it was horrific in the past it's helped so many people today.
At the end all I wanna add is PLEASE do research into this stuff creators you don't need to know everything about but a quick Google search reveals it's not that horrific, at least today! If y'all would like me to discuss another treatment in Arkham please let me know!