Where does ground of wall socket actually go?
It depends on your country, some countries do it slightly differently.
The North American approach is that the power company supplies hots and neutral.   You establish ground right at the house with 2 &quot;nails&quot; as you say, that are 2.5m long.  (8 feet).   Also, neutral and ground are bonded to each other at the main service point ONLY (the service disconnect aka main breaker)... so if a lightning strike comes in from the power company, it should take the bond over to the aforementioned grounding rods.
Of course in fact, lightning goes everywhere.
Further, power distribution lines in lightning country are supposed to have a &quot;ground&quot; wire running along the very top, above the main conductors, that is supposed to catch the lightning.  Also, the 3 hot wires (distribution uses only 3 hots, no neutral yet) are supposed to have lightning arrestors (VBO devices) that insulate normal voltages but conduct lighting to ground.   A lightning arrestor is an arrangement that brings the conductor close to a ground conductor, and the gap is wide enough that service currents won't leap the gap, but lightning will.