My company has been in the foreign contractor market for a while. I still make a massive US salary. Having been on the hiring team for many of these contractor shops I can tell you that the skill level of contractors in India/Africa/China/Ukraine has another 5-10 years before it even begins to approach the average skill of a seasoned American engineer. For a while my business as an independent contractor was quite literally fixing code written by foreigners because the company thought they could play this arbitrage game.
For example, we've hired several engineers through a very big name, silicon valley backed, foreign contractor firm. They perform at the level of a junior engineer at best.
Another perspective to consider is that the best talent in those countries (specifically China and India) are not going to these consulting firms.
China in particular have large tech companies (e.g. tiktok) that offer pays that almost matches the US, which skimmed the best engineers away from these contracting jobs.
The best ones also usually end up in California with a H1B visa. Also, why would one prefer to do random consulting work for a company exploiting salary arbitrage when they can choose to work for various companies doing more interesting work (either remotely or locally)?
For example, we've hired several engineers through a very big name, silicon valley backed, foreign contractor firm. They perform at the level of a junior engineer at best.