How do I program a reset?

I am using the MKR Wifi 1010 and I have approximately 85 in use (and working my way up to 500) with essentially the same sketch. They are used to send production reports in a manufacturing plant to a central database. All of them work flawlessly. When the WiFi disconnects, they reconnect with no issue. About once per month, one of them will stop responding. The charge light continues to flash so I don't think it is completely locked up. I cannot connect it to a laptop without resetting due to the MKR receives power through the USB port. I cannot predict which one will quit. The only way to get it to go back working is to cycle the power. Is there a way to program these to reset themselves every couple of weeks? Is a programmable reset the best choice to make these more reliable?