The capacitors on an SLC-5/0x controller will, if they are in good condition, hold the memory for several hours to several days. I have personally pulled an SLC-5/03 off the shelf after six months without a battery and found the program in RAM intact.
But with an SLC-5/01 that could be thirty years old and has something wrong with its battery status indication circuit, I wouldn't count on the capacitor to hold the memory.
The safe thing to do is to upload the program so you have an offline archive. Then you can test the controller with and without a battery to see how long it holds the memory.
Used SLC-5/01, 5/02, or 5/03 controllers are widely available on the aftermarket at low prices. If you simply want to assure that the machine will survive a power outage, get a memory module or a new CPU.