There was an article in The Australian about the use of metal detectors for these types of issues, noting that it was most probably impracticable, small extract below
Harry Debney, chief executive of Australia’s largest fruit and vegetable company, the Costa Group, said that although it was feasible to heat-seal plastic berry punnets to make them more tamper-proof, it was impossible for growers to completely guarantee that their fruit was safe when it passed through so many hands, trucks, warehouses and supermarkets before being bought and eaten.
“It’s a long supply chain and just how you secure fruit at every stage to stop this type of irresponsible behaviour that we are seeing now is really difficult,” he said.
“We already run a metal detector over all fruit on (sorting and cleaning) lines in our packing sheds to make sure no machinery parts or fragments have fallen into the fruit, but strawberries are different from the rest; they are the one fruit where most farmers pick their strawberries and put them into (retail) punnets directly in the field, so how would a metal detector or X-ray machine help there?”
Full article link here: (not sure if its paywalled or not)
Even if these metal detectors do work and are installed to prevent tampering or contamination at the farm and packing stages - whats done to protect the product once it leaves these facilities, once it gets to the supermarket? Like I'd noted earlier, this is where food products are at their most vulnerable. There is very little in place at this stage other than tamper evident packaging - which most fresh produce (fruit and vegetables - not pre-packed) doesn't have.