I have some updates about external power cycling for the camera. The problem is that I got complain from one guy that camera stopped working after 2 months. It's a really rare case and I suspect it's still something with memory card bug that happens from time to time and not for all cameras and memory cards.
In my previous post I tried to use super capacitor but it didn't work. Now I figured out that internal resistance of the capacitor that I used was 10 Ohm and it didn't work because of it.
Yesterday I did the following:
I took capacitor with a small internal resistance about 100 mOhm or 0.1 Ohm from here
http://www.mouser.com/ProductDetail/AVX/SCMT22C505MRBA0/?qs=sGAEpiMZZMuDCPMZUZ%252bYl1egjuYHMPsoOa6KEKoY0l0%3d
and I added voltage drop ""sensor" to the CHDK script to stop memory card writing if video or shoot is working when power supply disconnected.
In other words capacitor helps to perform "nice" shutdown of the camera.
It works! When I disconnect the power, camera continues to work and stops video recording.
I also use this cycle timer
https://www.amazon.com/2013newestseller-Multifunction-Self-lock-Module-Automation/dp/B00J0SMB3C
that reset external power supply periodically and restarts camera once per week or more frequently in case if it's stuck.
With this modification my camera will work with guarantee for years.