There are LRT trainsets which are hybirds. Most of the time they run off the overhead. But sometimes they run on trackage without an overhrad wire. So they have rechargeable batteries to get over the gap, charged while under the wirr...
Our overhead is the third rail. How about a small battery to get the train over rough spots using stored in the locomotives.