I think in the common case where you are just washing left over liquid and sanitizing the bottle it probably is super easy but then you have to deal with the rare cases where maybe the bottle is full of dirt or other things that would leave it still dirty after the cleaning process. I don't think its an impossible or even super difficult problem but it does raise the cost.
Working in automation, I've made machines that check for grime and misprints on new bottles and cans.
If a country were to standardize, say, drink bottles, detergent bottles, etc, then this is already a solved problem. Just have a machine clean the bottles to wash away dirt and remove labels, then run it through some image processing software to auto detect any residue. Anything within a certain threshold could either be accepted as clean or needing an extra wash, and anything over a certain % of dirtiness or having undergone N number of washes without getting clean is sent off to be melted down and recycled.
Once it's standardized, the software is made, done, and ready to deploy everywhere without any changes (until the government approves new bottle designs). Facilities would be cheap to build. The only problem is every drink manufacturer in the world would oppose it since they can't make goofily shaped bottles with cartoonish logos everywhere.
I can totally imagine Europe passing a law for this.
Wouldn't be surprised if it was also beneficial for the soda companies - standardised bottles would be cheaper to produce/acquire, bottling equipment as well.
For HN readers, this is an example of "don't make perfect the enemy of good."
If even 10% of the bottles were nasty, there are machines that can handle that.
Just like Europe's progress in standardizing chargers, we need to go back to standard bottle sizes.
One of the best examples is the Beer Store in Ontario, Canada. All brewers have to use stubby brown bottles, and achieved 99% reuse in modern times:
"Between 2013-2014, the Beer Store achieved a system-wide recovery and re-use rate of 99 per cent for the industry standard bottles, which are reused 12 to 15 times."
They accomplished such phenomenal reuse that the bottles wore out. So much for excuses, eh?
In this case you really do have to get the system absolutely perfect, not just good. It is unacceptable for someone to receive a bottle that contains any amount of dirt or other contaminant.
I'm not an expert in this so idk how difficult it is to ensure this but unless the system is perfect it can't be used.
It has worked with glass bottles in Sweden for I know many decades, maybe a century, unsure. Unfortunately glass bottle usage is down and plastic usage is up.
You don't have to make the system perfect. You have to make it cautious. At any time it suspects a bottle may be too dirty or not getting cleaned for some reason, it should reroute it to manual inspection line and/or straight to remelting. So now you lose 30% of your yield, but the rest is clean and sterile. That's a good starting state, from which then you can optimize the contaminant detection.