Just a thought – Robert mentioned potting. This is done because the wires move when the coil is energised, and the forces in a 24V 10A winding are strong enough to damage it. Loose wires break due to metal fatigue or the insulation chafes. Therefore wind tight enough to stop them moving and/or apply some glue as each layer is completed.
Not sure what the best glue is! Not super-glue. I smeared hot glue because it contains no solvents, but my sample size is too small, and the electromagnet too lightly stressed, to confirm it was a good choice. Hasn’t failed yet…
The old coil may have failed because a wire was able to move inside the winding enough to rub. Potting is supposed to stop the movement and corrosion, but it doesn’t always penetrate completely. Also, it keeps heat in which can cook the insulation if the coil left on for too long. Modern magnet wire is much better than older wire – many improvements to the chemistry and how the insulation is applied without air-bubbles.
Dave