While Windows XP will offer to to do a repair when it gets shutdown suddenly normally doing that won't cause filesystem corruption or even HARDWARE damage as is implied in the story.
My guess from the description is that the generator power is probably dirty - the right fix would have been an online UPS here with an app that shuts the machine down on power loss.
A second factor might be that the PC was set to start automatically when Power was applied and while booting up it gets turned off again several times I think a Windows XP (and windows 7) machine will then ask for user interaction.
You can turn this Function off tho and Windows will ignore power loss after that.