A question about "rare and valuable skills" - since many want to have valuable skills, and so they become common, is the only way to get rare skills is choosing to learn very difficult things?
Scott Adams talks about combining skills like that in his book How to Fail at Almost Everything And Still Win Big [0]. He talks about his own combination of skills being "funnier than average" and "decent at drawing". I thought it was a good read. His talk of systems vs goals was also very worthwhile.
0: https://www.amazon.com/How-Fail-Almost-Everything-Still/dp/1...
The only way a skill remains rare and valuable, is if the skill is difficult to acquire and master at a high enough level to be useful. All the high paid professions fall under that category. Software engineering is definitely one of them.