For big operations such as Western Union, it was store and forward.
Links were point to point links with messages hand-copied to paper at relay stations. Paper messages were sorted by hand, and re-sent by outgoing operators. Large buildings with large staffs were required.[1] KPH was such a relay station, where messages went from land lines to radio and back.
Low-traffic lines and railroads tended to have many stations on one wire. Similarly, ships could talk to each other by radio. To get into the interconnected system, you had to go through a gateway to a commercial network, and there would be charges incurred at that point.
Telegraphic ciphers and codes were common, both to save money through compression, and as it was well known that many people would be reading and re-transmitting the message as it worked its way through the system.
There were various standardized codebooks published for when the message was not secret and compression was the only consideration:
Low-traffic lines and railroads tended to have many stations on one wire. Similarly, ships could talk to each other by radio. To get into the interconnected system, you had to go through a gateway to a commercial network, and there would be charges incurred at that point.
[1] https://www.wondersofworldengineering.com/telegraph_office.h...