The 'clean power' would factor in a well, but I haven't really looked in to it. I know China is installing a ton of renewable and has a carbon market while Canada's building a new pipeline and building Alberta data centres running on natural gas, so I'm not willing to take on faith that switching is cleaner.
Also, re: power. I said canada has lots of cheap power, clean was your word.
The unfortunate truth behind at least the solar PV boom in China is that it's driven in large part by the exploitation of Uyghurs in the Xinjiang region. One of the reasons they can sustain the pace they're going at is because while nowadays PV modules exports increasingly gravitate towards offshore fabs (Vietnam, Malaysia), domestically all the biggest PV players make full use of modern slavery within Xinjiang's re-education camps.
more on the topic: https://www.shu.ac.uk/-/media/home/research/helena-kennedy-c...
It might be a minor nitpick, but that part is just not how the macroeconomic principle works. Abundance of a good/service within a country is irrelevant to the concept of a comparative advantage - this is counter-intuitive but but that was David Ricardo's entire point. It's not about whether production is more efficient domestically, it's whether comparative allocation of resources between multiple countries is more efficient by specialization within the different goods.
Even if you can produce "good 1" cheaper in Country A vs Country B, if Country A can instead produce "good 2" that Country B cannot, it's better for Country A to produce "good 2" domestically and import "good 1".
Now, I still agree with the original notion. It's unnecessarily risky to use services from "democratically-challenged" nations (especially imperialist ones), when safer options are available. But there's no need to twist macro 101 concepts to justify that view. Modern trade policy takes more into account than basic market efficiency.