I re-drew the schematic, hope it's clearer.
the water dispenser is comprised of an 18650 cell, circuit board and motor. The circuit board has a uC that handles USB charging and that enables/disables the motor when its button is pressed.
I want to enable/disable the motor periodically with an ESP32C3 through an optocoupler.