It probably makes sense to move to less polluted areas and such, but I doubt excessive hand washing and those smaller habits would do much. I think we'd see a clear effect of successful people being compulsive handwashers? I mean, there are impurities in other things we can't control as well (air, water, food), so minimizing impurity from the hand only makes a very small difference. Still, brilliant people live in polluted places like LA (Terence Tao comes to mind!), various places in China, etc. so it doesn't seem to determine your outcome -- in fact, research shows the impact is small (but it does exist). Success is determined by the big factors and knowledge/wisdom-based choices, not being a few percent faster or more effective at solving puzzles -- unless you're in a particularly competitive job (maths competitions, professional athlete, professional chess player, etc.). Most mathematicians choose to explore different directions, different fields instead of competing head to head to solve single problems[1]. Our bodies and brains are also remarkably robust to small loads of impurities... in fact, one of the techniques of AI is to get rid of a few neurons here and there (DIY not advised). Hope this alleviates some concerns :)
[1] I got this from Maryam Mirzakhani interviews: https://news.stanford.edu/2017/07/15/maryam-mirzakhani-stanf...