I've seen people who follow the strategy you prescribe, and while they did make above market while they helped companies migrate away from [dying technology] they eventually became unemployable.
It simply isn't a good long term play, for either employee or employer.