General purpose magnetic coils do get real hot. Lionels designs weren't a cobble; it was purpose refined. Some heat more than others but they ofen pull harder too.
Heat vs work needed vs volts vs wraps vs lentgh vs wire gauge vs amps, back to heat.... and dont forget slug quality. It's design a balance.
Sometimes heat build up has to be dealt with by lowering voltage to a holding voltage after the grunt work is done. I.e. your windings may be too strong or less efficient (I think you need to dial down voltage or windings or change gauge.)
We see this build up addressed in old whistle relay controls on transfomers. In one fast handle sweep, it begins with a offset voltage boost, the relay closes, then the handle hits a new contact that lowers the offset voltage partially, so the coil isn't still grunting to pull still, but instead calmly 😎 "cooly"❄️ holding it up. They use the trick on pinball flippers too. Once flipped up, a switch drops the voltage to a minimum to stay up. When they act funny one of the voltages or switch position or sw. leafs is usually out of whack.