A related idea has been used on railroads at a larger than those Lionel built equipment for: many trolley cars (trams, if you speak a non-North American dialect of English) have had magnetic braking.
--
I don't know if an idea like this offers any usable benefit for full-size locomotives. Russ Nelson isn't quite right: traction depends on the force with which the wheels are pressed to the rails: usually the force of gravity acting on the locomotive is the only relevant force, so in practice he's right about the weight of the locomotive being what does it, but in principle...
Wheel-rail adhesion tends not to be an issue, I think, at high speeds, but in high speed passsenger trains, aerodynamic forces may contribute an appreciable fragment of the downward force on the driving wheels. (Anybody have numbers on that?)
Even if you limit yourself to gravity, there are tricks you can play: General Electric's new ES44C4 locomotives have a mechanical arrangement that, at low speeds, can transfer onto the driving wheels some of the weight normally carried by non-motored axles: the effect is similar to what Type 7 3704's idea would give: temporarily, to improve traction, the force with which the driving wheels are pressed against the rails is greater than it is when the locomotive is turned off (and greater than one would want it it to be at other times: I think the weight carried on an AC44C4's drivers for short periods of time exceeds what the operating railroad (BNSF)'s civil engineers would permit on a regular basis).
--
If you DID try to use electromagnets to increase traction, they wouldn't have to be mounted in the wheels themselves. Electromagnets mounted on the locomotive frame could pull the whole carbody down toward the rails, and so increase the pressure on the wheels.
I don't know, and am not enough of an engineer to know what back-of-the-envelope calculations to try for an initial judgment as to whether the idea is worth pursuing! For all I know, it might have applications: perhaps as an alternative to the use of rack sections on a mountain railway with very steep gradients. Hey: SOME people think MagLev is the way of the future for high-speed railways, WHY NOT "MagDepress" for others?