I have a friend who motorized his other handcar. what he did was have a friction drive on rail wheel, or one could put that on the track itself. Either way, you kinda have to have a disconnection from drive when you aply the brakes, and your going to need them.
I reckon with a rig like that you could get up too a fare clip, I think a disc brake would be pretty good.
Looks fun, but only if your not on a owned rail line. Out here it is considered trespassing even if stepping on the line past any crossing.