If you hook 100KW of neighbors up to your 5KW/20% THD garden generator it would probably trip the breaker, or stall.
Assuming that you don't want to deliberately simulate a utility grid on the same transformer as your neighbors, the bad news is that line workers could be injured by your back-feeding. Not so likely for your neighbors because they wouldn't be touching the lines, but yeah, not great for line workers actually working on them.
At any rate, you will trip any generator once you overload it. Worst case, you'll burn out its electrical components.
I suppose it could be an issue if it was a single house on a branch where the break being serviced was just that branch (rural customers.)
Typical assumption, regardless of it's urban or rural, as each house would have its own main breaker anyway - both at the customer panel, as well as at the utility source point (last one may vary by country).
Was just curious why it wouldn't overload the generator trying to power all the neighbors houses if connected to the grid.
If you did not isolate your self-generation equipment from the grid, then you may very well become a provider for your neighbors all hooked on to the same distribution wiring, or even on the same transformer.
It would likely never work in any meaningful way, and you increase your chances of starting a fire or breaking things irreparably.
AC-coupled grid-tied solar inverters automatically stop making PV power once the grid disappears, to avoid this very problem, if you do not have a local battery to substitute. This is defined under UL 1741 that all major PV inverter OEM's follow. There have been some changes defined under "California Rule 21 Tariff" that ease UL 1741 somewhat, to avoid PV inverters from disconnecting from the grid during an outage in order maintain grid stability, i.e., when a grid provider is accepting significant amounts of feed-in from private or commercial self-generation customers, a sudden disconnect of all that capacity during a main grid outage could make for a very unstable grid due to massive and sudden variations in voltage and frequency.
I'm not yet sure of any other places besides California that implemented this requirement against PV inverter OEM's. I haven't tracked it since 2017. I know that here in South Africa, UL 1741 is still the main and only requirement.
A grid-tied battery inverter will automatically disconnect from the grid when it disappears, so it has no chance of transferring PV or battery energy on to the grid network.
Generators are not usually that intelligent. Some manual switching required to avoid grid back-feed, which was Sean's initial point. If done well, the generator would have an ATS (automatic transfer switch, either integrated or an add-on) to take care of all of this. In the absence of that (due to cost management or a lack of a thorough job), a manual changeover is highly recommended.