Pesachim 23a: Hunters or fishermen who accidentally caught non-kosher animals are allowed to sell them to gentiles. Rashi: This is only if they caught them accidentally, but deliberately doing business with non-kosher food is forbidden, as stated in the Mishnah (Sheviis 7:3).
פסחים כג ע”א: ציידי חיה ועופות ודגים שנזדמנו להם מינין טמאין ־ מותרין למוכרן לנכריםִ.
רש”י: שנזדמנו ־ דווקא שנזדמנו דלא מצרכינן להו להפקירן, אבל לכתחלה אסור לחזר אחריהן, כדתנן התם במסכת שביעית (פרק שביעי משנה ג): אין עושין סחורה לא בנבילות וטריפות, ולא בשקצים ורמשים.
Rabbi Yehoshua Falk was asked a shailah by the Jewish owner of the kosher slaughterhouse in his town. Sometimes there was no shochet available, but the gentiles of the town wanted meat, and his gentile employees wanted work. Could he tell his employees to slaughter animals and sell them as treif?
Jewish slaughterhouses typically sell to gentiles whatever animals are declared treif, as well as the parts of the animal that Jews don’t eat. This is not considered doing business with treif, because it is an “accidental” by-product of kosher shechitah. But here he would be deliberately slaughtering non-kosher.
The rav reasoned that although it is forbidden to do business with treif, in this case the Jew would be doing nothing, only telling his gentile employees to do the work. This would depend on the question of whether אמירה לעכו”ם (telling a gentile to do an act forbidden to the Jew) is prohibited only for Shabbos, or applies to all types of aveiros. This question is posed in Bava Metzia 90a (regarding telling a gentile to muzzle a cow while it treads out the grain). He reasoned that we can rely on the Rishonim who say that the question was unresolved, and therefore we are lenient because “telling a gentile” is a Rabbinic prohibition. However, he sent the question to his rebbe, the Chasam Sofer.
The Chasam Sofer replied that if “telling a gentile” had been relevant here, he would have agreed to permit it, both because of the opinion of the Raavad, quoted by the Rosh, that the question is unresolved and we are lenient, and also because many say that the entire prohibition of doing business with non-kosher food is Rabbinic. However, “telling a gentile” doesn’t help us here because in the end, the Jew is the business owner and he is the one making the money off the sale of the meat. The fact that he is not doing the physical work himself is immaterial.
Rather, the Chasam Sofer proposed a different solution: to sell all the animals to the gentiles and have them slaughter, sell and keep all profits for themselves.
Source: Chasam Sofer, Likutim 6:24