An isolation transformer will prevent electric shock should you accidentally put your body in contact with the hot side of the device and earth.
https://en.m.wikipedia.org/wiki/Isolation_transformer#Electr...
https://en.m.wikipedia.org/wiki/Isolation_transformer#Electr...