RobotDyn dimmer controlled by ESP 07 only results in flickers
You seem to be using PWM to try to control the dimmer. That's not how it works.



Figure 1. Phase-controlled dimming is done by turning the triac on at some point in the mains half-cycle.



Instead you should measure the time between zero-crosses at (1), start a delay at the next zero-cross and then turn the opto-triac (2) on. This will trigger the triac (3) which will stay on until the next zero-cross when the delay and triggering process can be repeated.

The longer the delay the dimmer the light.