Extraterritoriality comes in conflict not so much with democracy, but with sovereignty, i.e. an autocratic regime is just as likely to be displeased when a foreign power exercises its foreign policy through extraterritorial laws.
Quoting an EU study:
There is a general principle in international law that one state cannot take measures on
the territory ...
There is no problem with democracy here.
The US cannot forbid German citizens or companies to deal with Russia.
The US can forbid US citizens or companies to deal with German citizens or companies who deal with Russia. That applies US law to US citizens who do something the US government and congress dislike.
It might be a violation of trade agreements ...
There are at least two sources that mention negative effects on Russia as the main motivation for sanctions.
Cruz argued completion of the pipeline would give Russian President Vladimir Putin more leverage in the region and “generate billions of dollars for Russia that will be used to fund military aggression against America and ...