Turning Trains Into Carbon-capturing Machines