It's not a hard problem, it's an impossible problem, because it violates the first law of cybersecurity: physical access means game over. When you start allowing untrained and un-punishable customers to mess with your meatspace database, of course it will lose all semblance of usefulness.
This problem is not hard to solve when you limit physical access, i.e. in a warehouse, pharmacy, or locked room where multiple employees are responsible for checking in and out items. These solutions arose directly out of your conundrum in retail, and investigations are launched when someone discovers a mismatch between inventory and real life (think toxic chemicals, drugs, etc).
Of course it just so happens that nobody wants to go to a grocery store where they're not allowed to touch the items.
This problem is not hard to solve when you limit physical access, i.e. in a warehouse, pharmacy, or locked room where multiple employees are responsible for checking in and out items. These solutions arose directly out of your conundrum in retail, and investigations are launched when someone discovers a mismatch between inventory and real life (think toxic chemicals, drugs, etc).
Of course it just so happens that nobody wants to go to a grocery store where they're not allowed to touch the items.