I have about 20 battery devices, button, lock, leak sensor, alarm sensors, etc.
I have a spreadsheet I use to track the change date of the battery per device and it also lists the battery date and links to the master inventory of my batteries that are in storage and the date's brands that I purchased. This method has worked well since it identified a bad batch of Amazon's basic batteries CR123A which Amazon replaced for free. After a couple of years and battery replacement cycles I end of up with an estimate of how long before the next change. This assumes the devices will last for years.
I tried to do the same at my mom's house but she is a battery replacement fanatic. She also has buttons, sensors, etc but she doesn't know how to replace those batteries but she does burn through AA and AAA's. So what I did for her is write the current date on the battery replacement using a sharpie. I told her when she replaces batteries to put the old ones in a container. When I visit her every few weeks I pull the old batteries out which were labeled, test them, and most of the time they can go back into the service queue I then open up devices and label the ones she replaced.