Agreed, but I think it's already happening and will get even faster, possibly within the next 5 years. All my cousins in highschool are learning RoR / Python; millions of contractors overseas are picking up new languages besides PHP (granted, most of them still write terrible code). It has just gotten so easy to build basic CRUD apps that people need a hell lot more to call themselves developers.
Ya, I lost the instruction manual to my crystal ball so I hate trying to predict things like this, but I don't see any moat that the US has that will stop the world from writing the simple CRUD apps. And we regularly get 'self taught' resumes coming through where people have tossed together some simple apps that they have sold. It's a pretty low barrier to entry when everyone owns a smart phone and the dev tools are free.
Learn math. Learn physics. Learn some chemistry or biology. Be able to write digital signal processing code. Know linear algebra. Learn some NLP. Learn enough algorithms to write an efficient soldering path tool, or network router. Even there I am not sure of the moat; the number of searches for terms like "asymptotic complexity" are far higher in places like India and China than the US. But if you can reasonably say "if I leave it will take 3 normal people to replace me" you will have job security and the ability to command a high salary regardless of the economy.
Secondarily, I think there is an untapped market for people that are actually able to architect software and lead teams. I don't mean writing StrategyFactoryAbstractVistorBuilderFactorySingletonFlyweight horror shows, but actually putting together a solution that is maintainable and extensible over time. The field seems very immature in this regard. Or someone that can just think clearly, put a plan together, and execute it, even just at a middling level, seems pretty rare. I don't know if that (project management) pays a lot, but I think skilled people are worth their weight in gold. It seems to attract people that don't have the technical chops, not because they chose a different education, but more that they tried to be technical and just weren't that smart. If you are smart, you will always have a job in that arena.