One thing that trips up some coders as they get older, is that on some level they expect to be able to stop learning new stuff, and settle into the role of grizzled veteran. While that is true in most fields, in software, it just isn't. If you are retiring in 5 years, you'd better be learning some new stuff now to be relevant/employable 2 years from now.
But, if you're willing to keep learning, then the fact that you have seen a number of tech trends come and go does give you a perspective which is worth something.
Lastly, you will probably make more money if you go into management or etc. But it's not like you have to be homeless if you stay a coder, so for me that's not much of a sacrifice.