Again, you still have to put in way more work. You have to somehow know the weight of the container, otherwise it will never register as empty. Or you have to know the volume and the density of its contents (or worse, think about a jar of olives or pickles, how would a weight tell you it’s empty with the brine in there?). You still don’t know the expiry date. There’s no chance of automatically tracking this stuff.
The weight and expiry of the contents is printed on the package. Brine is a problem but olives and pickles it's much more tractable to estimate from a picture. These are all essentially solved image recognition problems. It doesn't need to be perfect to be useful either. The expiration date is the trickiest one, but mostly because you would need cameras on all sides including top and bottom, so you might end up having to hold it up for a moment to make sure the bottom is clearly photographed.
And yes, it's a bit more work but it gives high-fidelity data, with the right software you could calculate your actual nutrient intake with very high fidelity, which would actually be worth an extra 15-30 minutes a day of effort.