You can look at using the Inventory Complete
webhook and ship the event somewhere. All EAs run at recon, so every time recon completes, jamf pro server can ship a hook as the event. The downside to this is that the event has to be shipped somewhere, and it doesn't include the entire inventory record, so you will have to do a call back. You will also have to buy/build some sort of web app to handle the hooks.
I know this doesn't answer your question directly, but it is a path I would say worth exploring as if you build it for this, you can use it for all the webhooks and then build data, or flows that are aware and can take action of state changes.
Store the info in a plist or other file locally. That way you can populate the values on the device using scripts then use the EA to just read them in to two EAs current and previous.
I like the plist idea. That may be the cleanest way to run this.
local flat files is a good way to go light weight, but it doesn't store historical data, unless you want to do like a sqllite database or something and keep track of it, but if that endpoint needs to be wiped or fails that data is gone.
An EA is just the current state of that data you are collecting.