PCB Layout - Design Critique Requested
Allowing the ESP8266 module to overhang the optoisolator violates the isolation boundary. Consider rotating the module so that it overhangs the (currently unused) space on the left of the board.

Using surface-mount resistors for pullups will save you a considerable amount of board space. (The thru-hole resistor on the HV side is fine.)

You only need to use thick traces for nets that will be carrying a lot of current. You can safely use thinner traces for the optocoupler and the voltage regulator, as neither of these should be carrying a lot of current.

Rotating the BT136 180° may allow you to move the optocoupler up and the resistor down, saving some trace length.

Adding a fuse on the line input might be a good idea.