When telegraphs came into use, they were powered by batteries. How were the batteries charged before the use of steam-powered generators, or where hydro dynamos or other sources of power were available? AFAIK, steam-powered dynamos were not really available (like, out West in the middle of Nowhere) until about 10 years after the completion of the transcontinental telegraph.
wet batteries can be assembled on site as needed.
The power needed to run the telegraphs is quite small. Major power generation, such as provided by steam or hydro isn’t required. Secondly, you don’t need to charge primary cells. They are essentially “pre-charged” as a result of their chemistry. The Leclanché Cell is the best example. You simple assemble it, dissolve the electrolytes in water, pour it in, and the cell delivers power. As johnpost points out, you do all this on site. Eventually the cell is depleted, and you build another one. Most of the parts can be reused, but you need a new anode and electrolytes.
Take a strip of zinc and a strip of copper and shove them into a lemon. Measure the voltage between them. Who charged the lemon?
Your mistake is in believing that batteries need to be charged. Batteries were invented long before rechargeable ones were invented. They were just single use. Use until dead, then throw 'em away and get new ones.
Essentially the “charge” came from smelting whatever metal was used in the battery- zinc, lead or what have you.
Yeah, when schoolkids make batteries out of potatoes or lemons, they usually describe the veggie as containing the energy, but really it’s the two bits of metal that are more important. Unless, of course, it’s an Aperture Science-sponsored science fair, and one of the students used some stuff from her dad’s work on her potato: Then, all bets are off.
OK, out with it . . .