Long pipe runs, even some short runs of buried pipe are protected by having zinc blocks attached to them, called 'cathodes'... called 'cathodic protection'... this protects the pipe from electrolytic corrosion. (not any kind of electrical surges)
Click here for articles on such corrosion protection
Buried pipe and rail road tracks are continuously grounded naturally, neither have any sort of electrical surge issues.. its all about corrosion, the zinc blocks corrode before the steel when attached to steel.
Rails are connected electrically however above ground. it is a way to bleed the static electricity built up from the rolling steel on steel primarily but also diverts any lightning strikes more directly to ground.
Electrical surge protection from lightning strikes is done by the extensive use of ground rods... and with in line surge protectors, you can buy these to protect computers and other electronics from all sorts of surges and 'dirty power' common from the local utility, and with stand by generators.
Your interests will be in those areas exclusively.
Electrical surge protection is a complex topic, there is none yet developed that will protect from a direct lighting strike, ball lightning forming for instance inside the home, going 30 feet across the room to reach a ground such as a kitchen sink faucet.
I just spent a few days studying up on surge protection for my own computers.
Its searchable on google with the term's. "UPS, APC, surge protection, Joules" In summary get a UPS unit to plug your electronics into, those have a large battery inside, and a rectifier that filters incoming power... the higher the 'joule' rating the better and the more electrical spikes it will handle before it dies. A good one will cost between $150 and $250 depending its amp hour, and joules rating.
200 joules is a bare minimum, most quality UPS units are rated rated well over 500 joules.
You can study for a day or so on the details of how these surge protectors are fabricated. The cheapest ones are merely printed on circuit boards and wear away with each surge... the best ones are hefty solid state devices built to interrupt surges without damage to themselves (within limits)... (a direct lightning strike will toast everything, regardless.)
Let me know if that helps. and please do not forget to rate my work, its how I earn a living.