Use a padlock. Put the key where only knowledgable users can find it. This will cut down on your casual visitor screwing things up.
Engineer a dyson-vacuum-cleaner-like apparatus which 'sucks' water and beans in different ways.
Do the first comment's ideas, but make it a two-stage event - first is to put the item on the grid/flap, second is to manually fold the gridflap into the machine, where it's dumped into a temporarily unsealed beanbox. Water won't stay in the grid long enough to hang around for the second stage.
Create a sniffer that requires the scent of a fresh bean to be presented before opening the port.
Drink hot chocolate instead
Sell special iron-laced beans and use a magnetic apparatus.