Looking around at my current company, co-workers in their 50s seem resistant to job swap. I would guess this is because they require security before moving into retirement. Without moving, their "value" may continue to increase, but surely at a slower rate than the market.
At what point does your value to a company begin to stagnate/decrease/slow down? Is there a combination of age and experience where company swapping is not such a good idea? Does moving to management maximise value increase?
It is less about a specific timeframe as much as how you choose to focus your personal growth. It also is possible to continually increase both, but that takes even more effort.
That said, I based as many decisions on work making me happy as making me rich.
While you're young, it is important to get exposure to a wide variety of environments, to learn and build your skills, and to get a feel for what "normal" is across the world of business.
As you get older, you'll start to notice that things happen again, but slightly differently. Pay attention to the differences when this happens, there are new things to be used, but you'll have to put the work in to see what those differences are. If you can do this, and have institutional knowledge at the same time, you might look exactly like those co-workers you have in their 50s appear to you right now, to the next generation of programmers.
--- Practical example:
It's really, really hard not to write off completely the 4th time you've seen a virtual machine hailed as the solution to all things software related.
0 - IBM decides that Virtualizing the IBM 360 using hardware will enable a new era of computing. (This is before I was around, and doesn't count)
1 - First, folks got tired of rewriting compilers for each new microprocessor that came along, so the P-code system was invented at UCSD. You wrote a tiny machine specific interpreter for your system, then you could enjoy the benefits of the entire UCSD Pascal system.
Except... it was slower than native code. The system library was generic, and failed to take advantage of new hardware capabilities. The biggest failure was that the code you were writing was in the same VM as the debugger, so it crashed all the time.
2 - The web comes along, and the need to write code that can run on both a server and a client results in Oak --> Java. The demands of the users eventually result in so many compromises in the security model that VM escapes happen all the time.
3 - To make it easier to keep systems up, and deal with hardware changes, Virtual Machine platforms such as VMware, Xen, and the like come to dominate the way computers are managed. Devops becomes a thing. VM escapes still happen.
4 - WebAssembly implements a new virtual machine platform that is designed specifically to prevent VM escapes. IF they can resist the urge to make the outside machine accessible through API calls, it stands a fighting chance of actually working out.
5 - (Future) - the lessons of WebAssembly are learned, and carried back into operating system design. Capability Based Security eventually makes general purpose computing safe for the masses.
I'm putting my efforts into 4 and 5. I'm 58 years old.