I have not experienced either treatment. I can say, however, that from what I've heard and read, ECT helps people. I have not heard of anyone in contemporary times who says they are not helped by ECT.
As for TMS, what I've heard or read is not all that encouraging. It's very expensive, but doesn't seem to provide reliable, good results. Works for a few people, not so for others.