That is a battery charger, what you need is a voltage regulator. If you connect a fully charged 18650 directly to an ESP32 it will instantly be destroyed. ESP32 itself has a maximum voltage of 3.6V with normal working voltage of 3.3V but a fully charged 18650 will be at least 3.7V and while under charge even more.
Is your 'custom design' using only the ESP32 IC, a WROOM module (with a metal can and side contacts) or is it a pre-assembled module like NodeMCU ?
Brian.