The key advantage of the mesh is not to perfectly prevent water from flowing along it, but to be something that even the most caffeine-deprived user would not accidentally try to pour water on. Even if it does nothing mechanically to prevent water from entering the machine, it will psychologically prevent misuse.
The mesh wouldn't need to be that fine if it just had to exclude whole coffee beans.
I think I'd use a bottomless bean bin that pulls out with a handle. While it's pulled out, it's over a grid that lets water pass through (and ideally makes it clear that any water added is just going to be dumped right on the counter). When it's pushed back in, the beans fall into the actual bean reservoir.