Historically, the switches on regular railways were switched manually using a lever by dedicated staff to route trains correctly before getting replaced by an automatic electronic system. A similar system is in place for trams in modern times, but how was it done before this was possible, with horse-drawn trams and at the beginning of electrification? It would obviously not be possible to have separate staff be responsible for switching the switches like on railways in cities as they are often located in the middle of roads, in addition to being very numerous in more complex systems. How did tram switches operate before being equipped with an automatic electronic system?
I don't see why the simplest explanation isn't the best, i.e. manual switches.
Freight trains used to have people on board whose entire job was to manually walk and throw switches. This would work just the same for trams. Also, trams don't usually travel at high speeds, to it wouldn't slow things down much at all to have someone walk to manually throw the switch.
You don't state why you think that manual labor was not possible. Especially in older times, labor was the cheapest part of any process.
I think you don't understand how the switch can work if there is no place to put the lever in the middle of a street. The answer is simple: you only put the socket and every driver brings his own lever. This system is still used today when the electric drive malfunctions.
Here's a video where it can be seen how it's done. We can see the driver putting the lever in dedicated socket.