What you describe in (2) doesn't just apply to software developers. It can also apply to sysadmin/SRE-type roles. I'm what passes for an "expert" at operating a very complicated yet unremarkable piece of software used by maybe 100 companies world wide. My salary has gone up rapidly over the last 5 years mostly because of my knowledge of this niche (and near EOL) software.
My next job likely will not be using this software so I'm doing my best to keep up with what's changing in IT generally. I even schedule a time once per week to work on a side project just to make sure my development skills stay sharp-ish. Despite the effort I put in, I expect that I'll likely have to take a pay cut if (when) I go to another job at a different company.
If it sounds like I'm complaining, I'm actually not. This is just how it works I guess.
My next job likely will not be using this software so I'm doing my best to keep up with what's changing in IT generally. I even schedule a time once per week to work on a side project just to make sure my development skills stay sharp-ish. Despite the effort I put in, I expect that I'll likely have to take a pay cut if (when) I go to another job at a different company.
If it sounds like I'm complaining, I'm actually not. This is just how it works I guess.