Help understanding optocoupler wiring

No.

An electrical circuit is just that - a circuit. There must be a complete path for the current to go from one part to another and return.

The matter explained in the reference is simply that when you connect one part to another, and specifically an input device, you must connect not only the "signal" line but the corresponding return from one to the other otherwise you do not have a circuit.

So you connect 5V and control line from the ESP32 to the relay module (with the VCC to JD-VCC link removed). The return is the 5 V, not ground.