I think it's very selfish to oppose H1B visas. America is wealthy compared to almost everywhere, and phenomenally wealthy compared to many of the places these H1B workers come from. Furthermore, the best thing for the US in the long run is to import as many smart people as it can. The best thing for us in the long run is to import as many smart people as we can. There are economists who dispute increasing immigration, but there is to my knowledge no serious argument against importing smart people.
Again, there is to my knowledge no economist, who anyone takes seriously, who would say "The USA needs to import fewer tech workers". It's a gain for everyone except the worker being "replaced", and that's a fallacy anyway because the economic pie is not zero-sum.