Very good explaination and nice design !
I didn't know that opto could include the reverse diod. For sure it's even nicer !
One question for you !
On my design I have noticed that the timing of the zero crossing is not fully symetrical :
ON half period is wider (lasts more) than OFFone.
As a consequence if I trigger an intrrupt on both edges then I can get timing issues leading to bad flicker.
Did you get the same problem ?
My solution was thus to only detect falling edge and then to compute delays for both half periods
JP