This kind of thing certainly upset me and caused a lot of anxiety the first couple of times I experienced it, but as it's happened over and over again through the course of my career, I've learned to shrug it off. Some new thing comes along, people make lots of money working on it, then it becomes well-enough understood to automate, and all those jobs disappear.
It does suck, when you enjoyed doing whatever that thing was, to watch the robots take it over.
The thing of it is that Jevons' paradox applies to software development as much as it does to anything else. When it becomes easier (and therefore cheaper) to make software, people demand more of it. This creates new demand for human engineers to work on whichever parts of the problem are not yet well understood enough to be automated.
A software engineering career never stays put for too long, especially the closer you are to the applications end of things. You might get to ride a groove for as long as a decade, if you're lucky, but change will always come. It doesn't mean your career is over.