No doubt that working in catering factory is permissible in principle. But serving anything that is prohibited or harmful to consume is forbidden or haram. Thus, you are permitted to work in that catering factory as long as you avoid packing ham or any other prohibited food items.
Dr. Monzer Kahf, scholar in Islamic economics and financial expert, states the following: “Packing ham for food is part of serving prohibited food, and a Muslim should not serve anything that is considered bad or harmful according to Shari`ah. This means that it is impermissible in Shari`ah to package any kind of food or drink that is prohibited for consumption. There is no doubt that serving harmful food items, whether it is a full-time job or part-time and incidental, is prohibited.
Having said this, I should add here that working in catering is permissible in itself if one can avoid packaging bacon or any other prohibited food or drink items.”