Detergent Contamination of Processed Foods Today I bought a Jack Links beef jerky from a vending machine, and when I bit into it I got a distinct taste of something acrid and soapy. As far as I could tell the packaging was not damaged and the jerky was not rotten or spoiled. I have also had this experience once before with a package of fruit snacks, Welch's brand I believe, and when one of the pieces had a spot of something blue on it, and had the same horrible soapy taste, but only on the one piece.

My question is, are processed foods sometimes contaminated with cleaning products used to clean equipment in factories? And if so how often does this sort of thing happen?

I have already tried doing a bit of research on Google and have not found much other than a few scientific papers relating to bacterial contamination, but not contamination of cleaning products.
Food processing plants have strict regulation to comply with, which means washing the equipment often. Most places wash the machines with detergent at the end of the shift or batch. 

It may be quite possible for the detergent to get stuck in places or not rinsed perfectly and next batch of food picking it up.  Their main goal is to not get caught with bacterial infections.  Seems that you were the unlucky buyer of the first pieces of jerky coming out after a wash.

I'm not aware of published statistics for soap in food, and it is also less of a liability for them even though soap can be carcinogenic.  This kind of stuff is not rare by any means.  You decide if an anonymous base wage factory worker is where you'd like to place your trust when it comes to food you eat.