One has to understand that old Abe was talking about a different kind of electric cord than your typical 14 gauge 2 conductor zip cord. Especially since Edison and those guys didn’t get around to making electricity for a decade after he was dead.
But a cord - the veritable “ties that bind us” - containing a scintillating idea, can itself be electric. 1858 was before the invention of the motor as we know it, or the generator as we know it, so most people’s “knowledge” of electricity was that of the static electric shock kind, and the low voltage DC battery kind. The telegraph was a battery driven system.
Lincoln lived in the latter end of the pre-electric era, but at near the dawn of the Age of Science. So he would be aware of electricity as popular science, even if he hadn’t been exposed to anything beyond the DC battery.