I have that same IoT relay. Even without using the PWM output to do control via g-code, it can be handy.
I connect it through a cheap e-stop’s NC contacts and also a separate “router enable” switch (in the same small enclosure mounted above the Shapeoko), and I connected the NO contacts to “feed hold” on the controller. Mashing that button kills the router power and does the “door open” hold on Carbide Motion, which is what I generally want when I’m working. In normal workflows, to enable or disable the router, I just toggle the little enable switch.
Since “feed hold” does not stop rapid moves in progress, having a “real” e-stop that cuts everything can save your bacon or at least possibly mitigate bad things, but a “pan-pan” button for feed hold and router power is convenient when you want to call an urgent timeout but not necessarily a full “mayday”. I rather like my “not quite an emergency, but timeout!” button, and being new at this, I’ve used it a few times.
Your board might not look EXACTLY like this, but it’ll be close. The section that matters is over on the right end (it’s actually the spindle connector used on Nomad) Use the “laser +”/PWM output from here, and a ground, the “Laser -”/GND is handy. The PWM goes to the “+” input on the IOT switch, and the GND goes to the IOT “-” input.
The two photos of the 2.4e board attached in the EStop thread (post 4) show a set of four pins just above the “RESERVED” connector (that’s used for the Carbide 3D Touch Probe), with PWM and GND available. I didn’t take a photo of my board before I closed everything up, but I think the photos in that thread are stock.