ZEN Programmable Relays: Is the program cleared when the capacitor discharges?

No, the program will not be lost if the capacitor discharges or the Battery Unit reaches the end of its service life. This is because the user's ladder program and parameter settings are stored in Flash Memory inside the ZEN.