Here's a photo, a map and a first-person account of Canadian railway troop activities at night. Most of the activities described in the account use gasoline locomotives - these were employed in the 'forward' areas ...
The general layout of transportation systems serving the front lines would have been known to the other side (i.e. on both sides). Aerial reconnaissance was a very effective technology which came of age during this war. Artillery would often be 'registered' on potential targets, and ready for the command to fire on short notice. The rising plume of black coal smoke from a steam locomotive provided positive evidence of soldiers, supplies and equipment on the move.
While the gas tractors may have had some disadvantages, they provided less of a target for the enemy to shoot at by day. Tarpaulin screens were sometimes erected where railway lines were directly visible to the enemy.
These images are from: Light Railways of the First World War; WJK Davies; 1967; David & Charles Publishers.
Notice the hand-operated 'Ahooga' horn on the right side of the locomotive pilot.
There are a couple of World War One posts which are clearly identified.