That can be a tough concern. And then, "am I overthinking"--this question is often good at stirring up trouble of different kinds, especially if the response is some black-and-white thing like "stop thinking about it altogether".
One alternative is to think differently, by organizing your thinking.
For example, rank your fears as specifically as possible: "The specific technology that does steps X, Y, etc. will make me obsolete", etc. And then even break down and rank the various algorithms responsible for your redundancy.
What this kind of activity will do is give you purchase, or leverage, over the problem. You'll be able to see specific, often immediate steps you can take to make yourself less replaceable.
In my experience it's more likely that one's own changing feelings, tastes, preferences, interests will force them to move on in the 5-10 year timeline. You can also prepare for this in a conscious way so it's easier on future you.
However this works out for you, good luck & keep going with your exploration of the topic--taking some breaks to enjoy the present of course :-)