The potential for delusion is mostly intelligence-invariant.
More intelligence means more ability to discern illogical/crazy.
More intelligence *also* means more ingenuity in rationalizing crazy.
The vague term 'wisdom' is the probably the best one English has to describe people who have any immunity to delusion. It's frighteningly uncommon imo.
(If you don't like 'crazy ', think 'highly unbalanced or unrealistic points of view')