It's exactly that, it cuts power to the primary side of the DC/DC module.
Edit: Ah, it's a not DC/DC, but
AC/DC module,!
Well, not very different, you can make an AC switch with two mosfets.
The gates are charged only in the positive cycle, so a small 100nF cap is needed to retain some power.
When the switch opens, power remains only for 100-200ms.
Don't even think on using 08050, 0603 or 0402 for R3, must be rated for 400V+, better to use 5x 220K resistors in series, use large size (1206) or through hole!
Otherwiseit might arc over the resistor, thus unsafe. The rest is low voltage so no problem.
The IRF840 is overkill here, anything capable 2-3A continuous is more than enough for these small PSUs - Do some research!