When I learned it, it was in the context of the influenza and similar common viruses.
It's actually more nuanced than that. If you want to read more: https://www.openevidence.com/ask/bccc3cc2-e15d-4fb0-a0c5-16f...
There was a study that showed that people who had severe influenza (they were hospitalized) were 3 times more likely to develop dementia. And there are mouse models that show that frequency respiratory virus infections can increase may contribute to brain aging (in mice).
>someone who worked in daycare and often got sick with the flu or similar, has a higher risk of dementia (statistically-speaking).
I can't find any evidence of this being true. I can find evidence that primary school teachers have lower rates of dementia. Pediatricians also have lower rates of dementia, so I find this highly doubtful.