Sure, and gas is also better for your indoor air quality than stuffing your food inside a carton of cigarettes and lighting it on fire. But we're comparing against real alternatives, not fake ones.
We're comparing the development of cooking methods over history; those aren't 'fake', just mostly obsolete exactly due to gas/ceramic/induction and electric ovens.
Lighting before/during gaslight was in some ways worse than that, people routinely lit their homes and workplaces with nasty lamp fuels. You could either burn turpentine (which was smokey) or turpentine and alcohol (which wasn't, but was volatile and prone to exploding and setting people on fire).
People probably just didn’t live as long back then and so dementia didn’t have time to surface. Or it did but people lived in tight knit small groups and managed it.