This mod will create item request proxies on stranded trains that ran out of fuel. Which means that if a train runs out of fuel it can be provided with new fuel by construction robots.
fgardt/factorio-train-refuel-proxy
Factorio Mod that automatically adds item request proxies to trains that ran out of fuel
LuaMIT