Is your goal to be indispensable as in the only person still able to maintain some ancient legacy project that is still continuing? Or as in the person who gets things done?
Highly-paid professions have cookie-cutter skill-sets taught from the same textbooks at professional schools with the same basic curricula. They are valuable because those skills are valued, not because they trap their clients in some kind of infinite treatment plan.
My goal is to be the latter but I've worked with plenty of people who made it a goal to be the former.
I don't think it's necessarily irrational.
If you're self aware enough to know that you're on the wrong side of the programmer bell curve, you're counting down the days until retirement, if you're living in a market with relatively few tech jobs - this makes sense.
From detailed experience on this you want to be both the first person to be asked to take on a complex problem and the last person out of the door when things get tough.
Make yourself indispensable through being the person running towards danger, being helpful to your colleagues, being knowledgable and treating people with respect but only write stuff down when asked lest someone think you're replaceable by a few confluence pages.
Highly-paid professions have cookie-cutter skill-sets taught from the same textbooks at professional schools with the same basic curricula. They are valuable because those skills are valued, not because they trap their clients in some kind of infinite treatment plan.