Shouldn't the current be limited to 1.41mA because of R1 and R2?
Well, it is limited. R3 is entirely optional, since it is effectively in series with R1, R2 and the LED in the optoisolator.
The rectifier bridge is just a voltage-controlled reversing switch. In the approximate model it can be ignored as if it wasn't there. Its only job is to protect the LED from high reverse voltage.
But all that power dissipation is not necessary. We can have a circuit that really sips power:

simulate this circuit – Schematic created using CircuitLab
The two plots are for 90VRMS and 250VRMS - it works well across the usual international voltage range.
The idea is that the LED in the optocoupler is only turned on at the beginning and at the end of one half-cycle. Here's the LED current plotted for one line cycle at 50Hz:
The peak power dissipated across R4 and Q1 is about 0.1W:
The total dissipation across the critical path - R4 and Q1 - in one second is about 5mJ maximum - that's 5mW average power:
The MCU will be getting two pulses - one at the beginning and one at the end of the positive line cyclehalf-cycle. The mid-point between the pulses is at 90 degrees phase angle. The average pulse period is 180 degrees of phase angle.
So, for any pair of pulses you get the 90 or 270 degree phase angle at their midpoint. And for any two consecutive pairs of pulses you get the 360 degree phase angle. So it's easy to derive everything else with just one timer and an interrupt routine. The interrupt routine captures the pulse edges. The timer itself is configured for PWM operation and generates the phase-controlled pulses - once sync is achieved.
If there are two timers available, things are easier:
TIMER1 is free-running in capture mode, and captures each rising and falling edge on the optocoupler output. An interrupt triggered after each capture reads out the captured time and uses it to update the PWM phase reference and period.
TIMER2 is used for PWM output and runs at 1/2 line period - either 100Hz or 120Hz. The line period is exact and derived using TIMER1, the firmware doesn't need to know whether it's 50Hz, 60Hz, or something in-between.
The MCU controls the heater phase, it's not directly coupled to the optocoupler.
Another benefit of this circuit is that it will ignore staircase AC output from "pseudo-sine" inverters/UPSes. The staircase rises too fast to trigger the optocoupler long enough to capture the input. Thus you're protected from misbehavior with incorrect mains waveform - although this has to be validated of course.
But all of this seems overkill anyway.
All you need to get this going is a small, 1W or 2W PCB-mounted step-down transformer that will both power the ESP, and provide the mains waveform reference for the ADC. The ADC can sample at 1kHz or so, and the software then can find zero crossings etc. Note that the resolution of zero-crossing detection is much better than 1ms. The voltage samples immediately adjacent to the sign change determine exactly where the zero crossing was. You'd use that to adjust the timer period to ensure that the PWM timer is phase-locked to mains.
No optocouplers needed, and the software can be as fancy as you wish in determining whether the mains has usable waveform for phase control.


