Is this optocoupler front-end safe?
You missed nothing important. I did this most every month for 15 years at a surge manufacture plant. While most people might cut corners and have a single RC based reactive power supply it is wise to double up on R and C at times, especially if Vin is prone to surges. Two 3 watt resistors spread the heat and generally had a breakdown voltage of 400 volts, so 2 in series made it 800 volts, with a little safety margin.

Also R dissipates the real current as heat, so even for 120 VAC we used 2 18K 3W resistors in series with an AC type optocoupler. For 600 VAC (Canadian products) we used 2 47K 3W resistors, always the flame-proof type. We only used capacitors (X2) when we needed actual power from one or more phases. It was no more than 60mA with a range of 50mA to 70mA, so capacitor tolerance could be 5%.

Due to UL and ISO demands above 277 VAC we HAD to use 2 capacitors rated 630 VDC to be sure shoot-through was not possible. Please see this link about the capacitor issue and why 2 is much better than one, even for the best grade of capacitors.

You seem to have a keen insight as to how to make reactive sensing or reactive power supplies safe, even during a surge event. By the way, if used at the main service entrance panel you are allowed to use ground as a return path for current, as the neutral to ground strap would be in that panel.For outlets or sub-panels neutral must be the return path.

From our point of view shoot-through meant trusting a single capacitor not to arc internally during a surge, which is why series resistors are mandatory for us. They limit surge currents and turn-on currents if the power is switched on during a cycle peak (90 \$^{o}\$). The resistors protect any down-stream diodes and opto-couplers by limiting peak possible currents to their safe region. A well built reactive power supply is supposed to be safe to short out, as the capacitors set the overall current and resistors limit surge currents. We also used 1 mH inductors to block RF or surges with sharp rise/fall times.

Remember the capacitors are transparent to RF and surges with sharp rise/fall times, so the resistors are an insurance policy that works well. Adding an inductor (as an RF choke) is a cost and space-allowed decision.