From: Rabbi Moshe Sofer
To: Rabbi Yehuda Brandenburg
The Chasam Sofer rules that the Torah-level prohibition against trading in forbidden foods applies when the Jew acquires the merchandise as his own property. However, if the Jewish merchant structures the transaction so that he never acquires the non-kosher fish — acting purely as agent and broker for a non-Jewish partner in Egypt — the prohibition does not apply. He recommends practical safeguards, including explicitly acting on behalf of the non-Jewish partner and avoiding any kinyan in the specific barrels, particularly where significant financial loss is at stake.
Source: Shu"t Chasam Sofer YD §104