I think unless the U.S. alltogether stops writing software then there are few worries. It seems to me that what software companies will do is keep a smaller group of talented software engineers in-house as "core" developers who know the product and the
business and know the code-base and do the new development work. The maintenance work, adding features, customer requests, etc. will go overseas or be otherwise contracted out. It's already happening.
So if you love software engineering (and did not get into it because you thought you'd get rich from options or something like that), then you are probably pretty good at it and so get into the core development group or management, mind your P's and Q's, and
everything will probably be okay.