Those who say ECT is barbaric, medieval, etc, tend to be thinking of the ECT of the past, or the ECT depicted in the media.
I have received ECT in the past and it was the only thing that worked when medication didn't. It saved my life. Of course, it came with negative side effects such as memory loss (most of it temporary). But if I have to choose between negative side effects and death, I'll choose the former.
It is a safe procedure where they put you to sleep and induce a small seizure. I think of it like rebooting the computer, but rebooting the brain instead. I have no idea why it works but it does.