Maybe we should focus on fixing H1B first?
What's wrong with H-1B?
AFAIK there are a handful of companies that gobble the whole yearly allowance of H1B visas among them. Usual suspects are BigTech and large consulting groups. The later act as intermediaries: they sell worker hours at a higher rate, skimming the difference between their prices and employee's salary. If they were somehow barred from H1B program the H1B visa holders would presumably find better paying jobs elsewhere.
H1B rules around changing jobs means that even if the employee joins at a market-level salary when they come to the US, they tent to stay at the same company much longer and can be exploited. The new company has to go through a lengthy paperwork process to allow the visa holder to switch jobs. Also, since the tech world tends to use things like stock options / RSUs / monetary bonuses for large parts of compensation package and those do not count towards "salary" you may have a situation where an h1b holder on paper seems to be paid fairly but in practice get only about 40-50% of what their peers get.
If they were allowed to change jobs freely they would be able to negotiate their compensation fairly. The companies would be less intensified to hire H1Bs to save money and would also consider local talent for same positions. Everybody would win: both H1B visa holders and their families and American workers, too. The only losers would be consulting firms (not a huge loss, to be honest, most of their employees are overseas anyway, so the can absorb the cost) and BigTech (they have enough money, anyway).
There are other problems for H1B holders, like getting a green card is something their employer, and not them, can do - another area for abuse. And then some nationalities have to wait much longer to go through this process then others (essentially, the US migration service says that the country has too many people from India and Pakistan already, thank you very much), and there are other issues I don't recall.
Cognizant… we’re importing a ton of labor to make sales force modules work with each other.
It's a lottery with ~1/3 winning chance.
I'd say most of foreign devs in the US are actually L-1 that is actually worse because L-1 prohibits the dev from changing jobs unless the dev gets a new visa.
It's subsidy for big corporations so they can get cheap talent whilst removing incentives for domestic workers to learn the trade or upskill. You also get more people competing for resources which means higher prices. Quality of life going down whilst corporations getting richer.
I'm going to preface this by saying that I support broad liberalization of border controls; immigrants are the backbone of the USA, the engine on which we run, and we should encourage immigration and make it easy for immigrants to settle here. We have the space and resources; anyone who tells you otherwise is lying to you for political gain.
So, that said: H-1B shouldn't exist for software. The point of it is to fill jobs that cannot be filled by an American for some reason; a condition that doesn't exist in software development. Hire immigrants as software engineers, fine. But find a way to do it that isn't bullshit.