It's not going anywhere. Programming is becoming larger, and the problems it can reasonably (as well as unreasonably) solve are increasing in scope as business managers try to leverage a more socially-acceptable field.
Additionally hybrid developer/business folk are becoming a thing, diversifying the demand as well as the skillset. To say nothing of the "CEO Compensation" halo effect Silicon Valley wages have on the industry.
Next to sales it is increasingly becoming the most valuable aspect of many industries that are critical to modern western economies (finance, insurance, technology), and AI is 'always' on the horizon as a future cost cutter, so I expect the trend to stick around.
You don't have to look to Sweden for cheaper devs. You could settle for UK. Or Eastern Europe who have a totally different cost of living.