The machine itself should be able to detect that something anomalous is happening to the magnetic field as it is doing work on the metal item and immediately cut power.
The "OFF" switch vents the coolant (helium) outside the hospital so the electromagnet stops superconducting and can turn off.
Outside the hospital it would look something like: https://www.youtube.com/shorts/krMbFT0Ums0