With only 2 weeks of experience with the AirGradient and ESP/Arduino/D1 Mini, I may not fully understand everything, but from the quick glance I had at the schematics two weeks ago, it’s not feasible with a stock D1 Mini v4.0 board.
If you haven’t already, take a look at the schematics provided by wemos.cc: https://www.wemos.cc/en/latest/_static/files/sch_d1_mini_v4.0.0.pdf
The ESP8266EX uses its hardware serial port to connect to the host. The USB-to-Serial conversion is done by the CH340C IC. To put the ESP8266EX in programming mode, the RTS and DTR output from the CH340C needs to control the GPIO0 and the RESET pins. This is done with two transistors (UMH3N).
From the D1 Mini’s headers, we have access to the RX and TX pins as well as the GPIO0 and RESET pins. Great! But hang on! The problem is you can’t just put in a parallel circuit with another set of CH340C + transistors. There will be contention when multiple outputs are driving the same line. You’ll need to disable or remove the CH340C from the D1 Mini board.
The easier way, if we’re redesigning the PCB might be to put two USB-C Female connectors on the PCB and plug in a short USB-C (standard male-to-male) cable from the the D1 Mini’s USB-C port to the PCB, which serves as a passive passthrough extension.