Software development changes all the time, developers constantly have to upskill. Trends drive demand and NIH runs strong in the industry. There is nothing we're doing today that couldn't be done with Java for example.
Design on the other hand is interfacing with humans. Humans are meat sacks who hardly evolve or change, in fact, you might argue, they regress. For this reason, ageing as a designer is really not as challenging as being a developer. Sure, there is the newest shiny CSS frameworks, and people abandon Photoshop for Sketch then Figma. Etc. But overall, it's extremely stable. Trends, skeuomorphism, flat, neo-flat... whatever the industry do, the adaptation isn't too bad. If anything, since we moved away from skeuomorphism, we lost a whole lot of true pixel wizards. Anyone can design flat buttons, but the stuff that interface designers were doing in the early 2000s is a lost art. But I digress, overall, humans don't change, so design is a safe industry to age in. Source: I'm both.