(Muricans love black/white Draconian answers to serious, complex questions.)
Given the cut-throat competition for one of the Well-paid slots (whatever the ratio to the often insulting pay for those who shepherd only a few dozen lives at a time) there could be some (formal) acknowledgment of your well-stated opening: If a mental quirk arises, person could be temporarily be tasked with training others or similar tasks requiring experience of flying the actual hardware in use. Presuming that, in many cases an episode does not portend a declining spiral, is somewhat treatable--even within our current tenuous grasp of all such matters--formal recognition of this alternative could help lots.
Still, even were this method applied in good faith, there remains the prospect of no successful treatment, the only-delayed instant loss of all chops and income. More incentives? guaranteed pensioning off, with qualifications to address scamming. Consider thus: the Corporate expense of such a pension is trivial compared with [One mangled planeload.] Corporate must have this explained in language an MBA could comprehend, or any bright 12 yo. And that is not even snark/some are sociopaths themselves.
The obvious determinant of any solution to [perpetual] biped unpredictability is to use the fucking-money to ameliorate the pilot's sudden-death fiscally, encouraging self-reporting sans stigma ... and for Corporate to realize it's not only the humane solution, it's also the approach that places passengers in least *jeopardy. Translate the costs into the Liabilities of every (what's the TLA for piloting-direct-into-ground, again?) although there will be those because of weather and other conditions, not mental ones.
Airlines Could do this. Will they? ... Can we Make Them?
* Evading this dilemma with Stats is the natural inclination of every Biz-major, ever with eyes on the biggest prize: more-for-Me. aka What, me worry over an event every 5 years? 10 years?
(Same argument re cat rescue: why bother? when your piddling efforts can't alter millions of routinized executions, via percentages to 10 decimal places.)
But there's still the $Ms of hardware Loss and $Bs of Cost/per-dead-body:--THE PR--and the families in ever expanding circles. What is that Worth to a Corporation ..such as those we know?
(It's easy re the futility of cat rescue: THAT ONE gets to LIVE. And we humans get endorphins for realizing the fact and acting on it).
I'd bet that Corp shareholders/(screw the self-electing BODs) would support, by stock-purchase: this rationale as humane for the afflicted pilot/humane for the saving of even ONE-more mental-caused crash. And for being refreshing amidst the Crass-majority of Corps. Let's test that theory: doing $Well by Doing Good (but not as Tom Lehrer satire.)