There will always be vectors that you cannot prevent and any system can be circumvented. It's not so much a case of worst case scenarios that you need to be concerned about though, because the more out there they get the more difficult they are to achieve. You might be able to drop marble size pieces of C4 through, but you add a significantly higher barrier to entry around someone being able to obtain those types of things, make sure the customer gets all of them without being caught, and do it in a way that doesn't leave an easy trail (eg. if a jail cell exploded there would be professionals watching every second of footage for the last year). There would be nothing stopping someone dropping polonium pellets in for sake of argument but the changes of that are incredibly low.
What you really need to stop are the bulk "any idiot can do it" vectors. If I can go and buy a $5000 drone, load it up with a couple of pistols, ammo and a bunch of knives, drop it into a max security prison and start my own version of the hunger games there is a problem. And the barrier to entry to that is currently quite low.
The reason prisons are porous is a mixture of corruption and the fact that the money available to make them super secure isn't there. Prisons are designed to keep people in, not so much to keep stuff out. If you have a prison population of 300, you have 3 meals a day, personal supplies, letters, visitors, cleaning products, donations, and god knows what else that has to move through the prison gates. If you consider the sheer bulk of those items and the limited budget to police it, it is easy to see why stuff can get through.
When you consider the prison price of drugs you have a huge economic incentive to find a way to breach the security and all you need to do is compromise one person in the supply chain somewhere. If you get into the food supply and catering loop you can have drugs sealed inside bulk food items, coffee, sugar etc. 1 vac packed bag of coke inside a sealed bag of slop would be very very very very easy to miss.
My uncle was a max security prison guard for 15 years and I visited him at work a few times (not in the US thankfully). The guards are strung out, stressed and over worked. They are in a hostile environment working 12 hours shifts and what they want to do is get to the end of a shift without a major incident. He was telling me about one vector they struggled to find that was coming through visitation and that was a drug filled condom tied to a piece of dental floss. The dental floss had a loop in it that the visitor put round a tooth and then swallowed the condom. During the visit it was pulled back up and passed to the prisoner who then just swallowed it. Collect your drugs 24hrs later. It was only detected after there was a fight and a prisoner had the condom rupture inside.