A direct lightning hit on your nearby utility transformer will indeed create a surge within the connected buildings. Some of the surge will be absorbed by the other connected equipment (which may die in the process) including the equipment and electrical panels of all your neighbors.

Effectively you just need your equipment to be well enough isolated that the energy which actually arrives at your electrical system is unable to do damage to your equipment.

Unplugged (not just switched off, but actually unplugged) equipment I would consider to be unlikely to suffer damage. The catch is that the unplugged equipment must also be disconnected from other things that are themselves still plugged in (even if those other things are switched off).

For an unplugged computer, that means also unplugging the printer, the Internet modem and router, everything else that has a wire connected to the computer. If all the connected equipment is on the same power bar, unplugging the power bar cord from the wall outlet should isolate everything in one motion,

The Internet modem has the additional risk of a surge traveling through the telecom cable so it should either be disconnected from the telecom wire or completely disconnected from the network (all Ethernet cables pulled out) and from the computer(s).

You are correct that a direct lightning hit could traverse a turned off circuit breaker, but it does improve the odds in your favor.

One crazy aspect is that lightning can raise the voltage potential of the actual earth (the dirt) by thousands of volts. So the grounded 'protection' of the building electrical system can become a vector for energy to attack equipment. This is one way that unplugged differs from turned off, unplugged also isolates the equipment from ground surges.