the fly-back aka 'free wheel' voltage spike from a relay would be immediate. but they are common on the the collapse of any inductive load. motors. some LED's and strobes can cause the same issue. since you said the capacitors helped shows that there is something creating noise. there is another option. in the software you can change your trigger state from normally open to normally closed and use the normally closed relay contacts. this should be an easy fix and help with any noise issues since there will be a path to for any noise on your lines. also check if the lights you have are dimmable