Hi Sam,
First question is which trolley do you have? If you have a postwar style bump and go trolley with out the electronic reverse unit, then below are a few postwar products that will fit the bill. Each of these operate nearly the same, and interrupt power for an adjustable period of time, before restoring power and sending the trolley along its way. You could wire it in such a way that only one of the items below is needed to control both ends of your trolley line.
https://www.tandem-associates....l_trains_115_acc.htm