Dr. Monzer Kahf, a prominent economist and counsellor, said: “Factories that produces flavors produces permissible things that can be used for any purpose Halal or otherwise. Thus, for someone working in this type of factories does Halal things and it is of course halal to work in. Other people will be responsible for what they do.
However, if you produce a thing that can only be used to brew alcoholic drinks, not anything else, this production is then not permissible.