I think the closest to you requirements will be Grocy. You can define list of products you use, current stock, rules to add product to the shopping list based on amount, what to do when you move product between storage locations (e.g. move from freezer to fridge), etc. There’s also a mobile app. Having said that I stopped using it after couple months. Few reasons: mobile app had no offline mode, mobile app was not compatible with the latest app server version, I had many issues setting up current stock (many times I had to manually adjust the amounts after using consume/purchase option). Overall I like the idea but it didn’t work for me.
The problem with privacy is that people confuse it with anonymity. I agree that privacy is the basic human right and we need to fight to preserve it. But when something is used for illigal activites there should be a way to trace the offender. Still the tracing part should be legal and transparent.