Just the act of reaching the end of the string would flip it over. The wire would act like a gear stick. It would look a bit wrong though, as the wire would be leading, not trailing like on real electric trams.
I've just done a search for something like this, and haven't found anything. (The things I waste my time on! :) ) You should make one for your next toy fair...
The only new clockwork motors (other than for clocks and watches) that I could find...https://www.ebay.co.uk/itm/10-x-Clockwork-motors-with-keys-NEW-Clock-work-wind-up-educational/221389562412
I doubt they're reversing ones though. The only ones of those I could find were vintage Meccano ones. But still, think what you could do with ten cheap little clockwork motors!