I've experienced a train once with my horse when we were riding in a canyon. Even though we were on the opposite side of the river, the sound was resonating off the mtns like crazy. I dismounted and was able to keep her pretty calm by standing next to her, kind of between her and the train.
If you continue going to the area where you do have room to work with her, until she learns that it won't eat her, maybe that would help?
I personally wouldn't put myself in a position where I knew I wouldd't have room to work with her. Trains can be pretty scary, big and loud. Desensitizing will always help, but I don't think you can guarantee that she wont spook, especially at a train.
"May your trails be crooked, winding, crooked, dangerous, leading to the most amazing view" -Edward Abbey