Don't go down the steam path at all, unless the steam-magic-punk aesthetic is crucial. Have an enchanted rail with an enchanted thingamajig on the train that acts as a https://en.wikipedia.org/wiki/Linear_induction_motor. That way you don't even have to explain away why people haven't tried putting 2+2 together and tried heating water with wood to create steam if magic is so expensive, since the trains are so good that no competing technology can get off the ground.
It would also explain why it can't be scaled down into a smaller engine, if the enchanted rail slowly sucks in the relatively diffuse natural magic of the world over the course of the day and over a very large area, since the rails are 100s of km long and discharges it into the passing train's thingamajig.
High traffic rail-roads may be limited to ley-lines for interesting story conflicts, e.g. druids can't plant their magic grove, because that would shift the land's ley-lines and leave a Class-A railroad without power.