Interesting. Does that imply that your rolling stock are hand built too?
The magnet of course would help to hold the couplings together as well - for better or worse.
I have the feeling that distance measurement using magnetic fields would be unreliable, as you're looking for very small variations,
Play along with me. Mounted inside the tender is a linear actuator to which is attached a short rod. To couple, the (normally hidden) rod is extended out the back of the tender - think wasp stinger - and the engine reversed. When the rod is pressed against by the target car the force lifts the hinged actuator mounting plate away from a microswitch, signalling proximity, and, it is to be hoped, successful coupling. Actuator retracts rod, engine moves forward.
Play along with me.
I seem to be offering a problem for every solution.