I'm having those fancy ESP boards that come with a battery input pins/holders that can be connected to a battery to make them portable. They also have a dedicated USB port for charging/sketch uploads.
However, these ESP boards do not protect the cell against short-circuit or come with over-charge/low voltage protections. My intention is to use the cheap "18650 charging modules" that come with TP4056 chip and battery protection ICs, such as this one.
After wiring up, the output from the TP4056 module goes to the ESP board. There's just a problem. It'll work fine when the setup is being discharged, but how does it get charged when the ESP board gets connected via its USB? It just sends ~4.2V to the battery connectors and since this is already connected to the output of these modules, I'm worried if there might be any damage to the to either of these boards. I could charge them separately but during sketch uploads, the battery terminals are going to be fed with the charging voltage anyhow.
I'm wondering if it's somehow already safe against a reverse current, or should I add something to make this work.
Edit: Here's roughly what I mean: