A watchdog monitor device such as Maxim MAX6746 may provide a better solution.
Normally these types of devices will provide a reset at power up and then hold off a reset provided a trigger pulse is seen at the correct interval. If it is not seen the reset is pulse low and then high.
In your case rather than pulsing reset you could disconnect the supply and then reconnect to correct the latch-up. Within you software you would need to repeatedly trigger the watchdog to prevent the power being cycled.
Are you sure that you need to cycle power? It is rare that such an action is required and if it is there is a chance that the device is damaged by the excessive current that can flow during a latch-up.
Can you avoid the latch-up in the first place by incorporating better ESD protection? (for example resistors in series with pins subject to ESD with parallel diodes and possibly small capacitors as well).