Tracking events when offline, and report after reconnection

I have a device in an area that has real bad WiFi issues I can not solve.

The device is working as wanted in a good WiFi environment
As Part of its design it has an event, “door opened”, and sends a notification, using both types of notifications, hard coded and automations.

The devise can go offline 50 -100 times a day, anywhere from .05 seconds to 15 minutes. If the door is opened during its offline time, than closes before it has come back online, I would never know the door was opened.
Is there a way to have it send a notification of the event when connection is reacquired?

Bill S.

Yes, you can store the data in a variable or NVRAM and send it when the device re-connects.