As your own story shows, even in today’s modern times, there is planet of aging wiring still out there and in use.
If you’re asking whether it’s possible to build a home that can work this way, it’s been possible forever and it doesn’t require anything fancy, just a properly rated input outlet (not the same as a regular old bedroom wall plug) and a switch to disconnect from the mains so you aren’t electrifying the grid while workers are repairing it. Whole house generators have been a thing forever. You just have to take some elementary precautions. You don’t just plug some dynamo you bought off Amazon into any old bathroom outlet and say “tada!”