Let me give you a few more examples:
* Ropes can be used for hanging, and even for racially motivated murders as they were in the south. Does that mean it's unethical to work for a rope-making company?
* Paint thinner can be huffed recreationally for a high. Does that mean it's unethical to work for a paint thinner company?
* Computer security course knowledge can be used to hack systems. Does that mean teaching or learning computer security is unethical?
The thing about "externalities" is that, while some of them can be blamed on the producers of the products themselves, the blame for others lies on the people using the products. While in the above three cases I listed, the answer is more obviously that the people using the products in a harmful or irresponsible way are to blame, the assignment isn't always as clear cut in other cases.
That being said:
* Saying that working in the auto industry is unethical in general because of car accidents is silly, especially when we are talking about accidents due to human carelessness. Driver education in the US is atrociously limited as-is. While I would agree that some accidents can be attributed to manufacturers designing cars badly, or some other problem on the end of the company, the fact is that, if you put a sufficiently stupid person behind the wheel of a huge metal apparatus capable of going faster than a cheetah, bad things can and do happen with that person behind the wheel.
* Saying that working with alcoholic beverage production is unethical is in my view rather silly. While one could argue, and I would agree, that marketing specifically to drunks is unethical, there are plenty of people (myself included) who have drunk beer and wine, but never gotten addicted. Comparing heroin (a far more addictive and dangerous drug) to a drug that many people have been able to use without getting addicted is poor argumentation.
* Credit card companies may often have predatory practices, but that does not mean that every person who goes into credit card debt isn't using those cards in an imprudent, irresponsible way. While some of them are victims, most would, in the absence of credit cards, be falling prey to some other vice.
* As for defense: while weapons can and do fall into the wrong hands, nothing would change even if we magically went back to the pre-firearm era: bullies would just use swords, clubs, and trebuchets instead of firearms and missiles.
There are many externalities where the blame lies squarely on the companies (pollution, global warming, overuse of plastic, environmental degradation). But to assume that all societal issues involving industries can be blamed solely on the companies and people working in those industries is naïve.