Not sure what countries have to do with it. If someone takes something, that is rightfully yours, by force or other means then that's morally (and probably legally) wrong. It doesn't matter if they crossed borders or not.
But it's not clear that that's happening. In your OP, no-one has taken anything from you. They just haven't given you something that you feel you deserved but they, presumably, didn't.
You seem to be making the assertion that you've been unfairly treated, and that may be the case, I have no idea. But if you think that it's primarily down to foreign labour then the evidence is against you. There are a lot of US citizens employed in software development in the US. Much more than there are foreign nationals.