I am a flight instructor now 74 years of age. My real job was oilfield and later pharmacy. I undergo a flight review every two years. There is not a mental competency test for such. I assure you if the reviewing pilot thought I was mentally not good enough, I would not have my rating renewed.
On more than one occasion we have had to go to a pilot of great experience and skill and tell them it is now time to “hang it up” and quit flying solo. I hope I recognize that in me before that conversation is given to me.
My father will be 86 this year. His mind is very sharp. Age isn’t as much a concern to me. What I would like is mental and drug tests for government offices to do is weed out the narcissists, sociopaths, psychopaths, cokeheads, and those that need meds to simply function normally.