If US starts tightening immigration laws, US companies will start outsourcing their work (which they have already started). If they start to clamp down on outsourcing, countries like India have no incentive to let US to freely use their market. They would simply follow china's method and restrict entry to all foreign players. If US follows US first policy in everything, the third-world already suspicious of western countries will only see this as west's new imperial ambitions.
Software is easy to replicate, specially by people which have already worked in Google, Facebook, etc. People in third world already have expertise to set up the competition to US companies. All that is stopping them is competition from US companies.
US being the becon of freedom and hope the world is a net good for US and US businesses according to me.