I think you are right there. The solution?? Don't really have a clue.
I can still remember when NAFTA was being touted as the solution of everything. We were told we would send manufacturing jobs overseas and the US would be the leader in technology. Everyone laughed at the blue collar worker who was put out of work and told 'Get some education, get into the technological field.' We were going to export technology - of course they didn't say that along with the technology, we would also export those tech jobs, as well.
A country cannot survive this way.
The answer? It's simple: We need to educate our people better. It isn't H1-B that's doing us in, it's our schools. We need to demand a revolution in academic rigor in our schools. Otherwise we are doomed.