What a stupid authorette.
Just think, she is getting paid to write.
She must have watched a different Stand by Me.
I didnt see anything romantic about trains in the Stand by Men that I watched.
After all the Stephen King short story the movie was based on was titled The Body. In the story and the movie, the Young pre-teen boys go looking for and find another missing boy who they find had been hit by a train while playing on the train tracks.
Nothing romantic there.
But I will also disagree about trains or train tracks being dangerous. They are not. Trains are completely predictable in their actions under normal conditions. Trains travel on stationary tracks at constant speeds. They can not suddenly accelerate, suddenly stop or change direction.
In my opinion for something to be dangerous that thing must be in some way unpredictable, erratic or defective. Trains are rarely defective and in most any way imaginable are predictable. You wont ever find a train anywhere where there are not a set of tracks. If you find a set of tracks it is generally not a good idea to linger between the rails. The old rules of my youth still apply: Stop, look and listen before you cross the tracks. (which I did every day walking to elementary school).
If someone is struck by a train my first thought is that they were somehow negligent.