I have an idea for the 16u2, and should be easy to implement in the uno/mega maybe also without hardware changes.
It should be easy to send a special serial string to the 16u2 that triggers the reset of the arduino, like a "please reset me" function, and maybe another function on the 16u2 that expects a string every X time, if it not finds it it will reset the arduino, the string can be a "check that 3x3=6" so the 16u2 can calculate it and tell if the main chip is running and not corrupted (this should prevent long time locks due to power or programming bugs), maybe the 16u2 is clocked at less than 16mhz and is able to run under brown out limits of the 328.
yes i know the 328 will auto reset in case of brown out, but it can be a measure for border line voltages.
Why do you think that? AFAIK, the 16u2 does not support a "separate" communications channel to the 16u2 itself, just the standard usb endpoints that implement a Serial/USB function. If it WERE to implement a separate channel, or somehow add a new message type to the Serial channel, it would not be easy for standard host interfaces to send those through their standard drivers, anyway...
(Now, the 32u4 on Leonardo and Arduino Micro and etc uses a "baud rate set" to 1200 (who would ever use that for any real application!) to trigger a reset, and I suppose that that could be propagated to the 16u2 as well...)
(or did you mean to send the string from the arduino side?)
Yes i mean the "arduino" sends a string to the 16u2 that brings LOW the reste line. That's it...
The 16u2 only needs to wait for a special characters sequence (or maybe a specific pulse on the serial pins?)
In no way i am an expert of the Arduino platform, so i may be wrong, but it seems feasible to me.