Because some operating cars work with the uncouple button(using car chassis for ground/common) and some with the unload button(isolated from the car chassis), a DPDT (on)-off-(on) switch can be used to replace the bulky controllers. 6019 illustrated, RCS/UCS, GarGraves/Ross, RealTrax, FasTrack similar. If you really don't want the magnet energizing, just don't connect it or cut the connection.
DPDT detail connections... three terminals on the left, three on the right, toggle/slide up & down, as viewed from the bottom. Sorry the numbers aren't big enough, click on the diagram for a bigger view.