There are many sensors that might work, but I would choose something that doesn't give a false reading just because someone is walking on the track, or if a small vehicle passes on the track. You could use sound (noise) or a photosensor or weight/pressure or have a mechanical arm that gets touched by the train. I like the weight sensor idea. A strain gauge or similar kind of weight sensor would be buried under one of the rails and it would be calibrated to give an output when a very large weight is sensed, like several tons. Once buried, such a sensor would not be subject to breakage either.