"Say you live in country A, where the cost of living is $20k a year for basic food and rent. Your salary therefore MUST be greater than $20k a year if you are to afford to live in your country."
This is true, but as far as most of Europe goes, the cost of living is going to be closer to 20k than to 4k so an European worker is going to expect a salary in the same range as a UK worker. Especially if they actually do come over here and have to face the same cost of living as UK residents face. The guys in India may be a hell of a lot cheaper than that, but the guys in India also turn out terrible terrible code that's not worth even the cheap price you pay for it. Trust me, I've made a few quid cleaning up the mess one of these outsourcers left behind.
"Automobile manufacturers didn't leave the Rust Belt because the workers weren't good at their jobs. They left because people in Mexico could do the same job and yet only wanted 1/3rd as much money for it"
Funny, because my understanding of the situation was that the Rust Belt car industry died because they produced shitty gas guzzling unreliable basically disposable cars that would oxidise in six months, and they subsequently got eaten alive by the Japanese when they started making high-quality economical durable products that would still start on a cold day, a situation that the oil crisis only made worse because who wants a gas guzzler when petrol suddenly costs three times as much? The American manufacturers made the wrong product for the time, the Japanese manufacturers made the right one and the free market made its choice.