I have always had mains powered audio tape and head demagnetizers around, which work great for tools. Your idea could work, but you need an electro magnet - a ferrous rod inside a coil, and a lot of power, I think. Maybe more than you'd want to do with a typical audio amplifier and homebrew coil/magnet. My old Radio Shack tape eraser works great, but is rated for 120VAC and 8.5A, with a duty cycle of 1 minute on/30 mins. off!
A cheap audio head demagnetizer might be easier and cheaper. Wiha also makes a permanent magnet tool demagnetizer (400-10), but I have never tried one.
One might think that an unshielded transformer in an operating mains powered device might work. You bring the tool close to the steel part, see if it grabs magnetically, then pull it away.