Double Li-ion charging circuit logic
This (untested*) circuit should do exactly what you specify.
Adding the optional inverter and diode should cause it to toggle to and fro between batteries once the current one is charged.  

Operation:



Push button starts charging at battery 1.
IC1 + IC2 + Rl form a latch.
Pushbutton High sets latch output to high.
Chg1 low sets latch output to low.
Rl provides feedback to IC1 + IC2 which form a non-inverting buffer.  

Latch high sets IC5 in high after time delay due to Rt1, Ct1.
So IC5 out goes low after time delay and FET1 is turned on by low gate signal.
Gate 2 is high (trace it through).

When battery 1 is charged signal CHG1 goes low.
IC1 in low so IC2 out low so latch out low.
Even when CHG1 goes high again latch will stay in low state.
IC5 in is taken low by CT1 discharging via diode so minimal delay.
IC3 in low sets IC4 in high after delay due to Rt2, Ct2.
So IC4 out low after delay and FET 2 on and battery 2 charges.

When Battery 2 is charged either just let TP4056 stop charging (as it does) and signal end of charge with LED,
OR use optional circuit at lower left with IC6, D2 to set latch input high and swap back to first battery.

Depending on TP4056 behaviour this may or may not be a good idea. There may be a small charge period while the TP4056 determines that the battery is charged. The circuit should toggle to and from between the two batteries. How much charging occurs depends on several factors but it is undesirable to add substantial extra charge at this state.



Switch: A MOSFET switch is shown. Note that the charger voltage needs to be greater than battery voltage to present back feeding via the body diode. This is not a fault of the logic but a limitation of MOSFETs as switches. This 'feature' may be overcome by using either a relay or back to back MOSFETS. [Two P Channel FETS. Connect gate to gate and source to source. Two drains are input and output (either polarity). Drive connected gates with gate drive. (Despite what may be intuitive this arrangement DOES start when driven. The nervous may add a say 1 megohm resistor from the connected sources to V+. MOSFET Vgs_max must be less than supply voltage. FET Vth needs to be suitable for drive voltage used - say 2V or less in this application.




Untested: This circuit has neither been built nor simulated. However, I have built about 5 zillion** circuits over too many decades using a 74C14 or similar in analog mode as used here. It's entirely possible that I've missed something or done something stupid but odds are it will work OK. If not, remove the purposeful error (cough) placed there as part of the student's training (cough) and proceed.


** On average 1 zillion per decade.