This happens after every hurricane. Somehow, there's always somebody who doesn't get the word not to run a generator inside. My heart goes out to the kids who pay for their parents' stupidity. As for adults who do this, I have nothing for them.
OK, maybe add a CO detector & shut-off. But for every idiot this saves, how many people will die when their refrigerated medication spoils because the CO detector malfunctioned and wouldn't let the generator run? There's always a cost to these things, a risk whenever complexity is increased.