From: Rabbi Moshe Sofer
To: Rabbi Menachem Aharon
The Chasam Sofer rules that wine purified by a Jew in a non-Jew's domain may be permitted in a case of significant financial loss, but only when three conditions are simultaneously met: the non-Jew is legally bound to deliver wine proportional to payment received, the non-Jew fears legal consequences for tampering, and the Jew has a plausible legal defense regarding customs evasion. If any single condition is lacking, the wine remains prohibited even under financial loss.
Source: Shu"t Chasam Sofer YD §126