Use timeline curves. Predefine as many various ones as you need, load them dynamically if necessary. A single timeline could drive a material with any desired intricacy and timing. Very flexible. But might be an overkill already.
This is using a timer with some random values, replace it with a timeline track. Color tracks preferably.
make this light control go deeper
Once you go deep with curves, you can go even deeper :