It's a logical concern. There is no reason to assume that today's software engineers are any different than the 1950's coal miners. The world changes, bit by bit, there is no such thing as perfect job security for life.
Not really true...tenured professors pretty much have perfect job security for life.
That is similar to coal miners unions providing jobs for life. That is, it's only a job for life if the business model it relies on continues flourishing. Higher education looks like a more stable employer than software engineering, but I definitely wouldn't be confident in saying that it will look like it does today, 50 years from now.