Then, re-see that the batteries are low and turn the charging back on. An oscillation loop. How do you prevent this?
I'd say you need two voltage comparators plus a timer, none of which is all that complex or expensive.
One comparator that triggers at the low voltage discharge level and switches the charge system on.
And the second switching at the full charge voltage and enabling the timer.
Once the timer expires, it turns off the charge.
That allows full charge then some trickle charge time, which is pretty essential with NiCd or NiMH batteries, to equalise the cells and maintain them in good condition.
For the simplest practical and moderately fast NiMH "charger" setup, you need a DC power supply a volt or two higher than the full charge voltage of the battery.
You connect that to the battery via a rectifier diode and series [power] resistor.
The resistor value needs calculating so when the battery is at its full charge voltage, the current is just under C/20
That means when the battery is at its minimum voltage, the charge current will be rather higher; the less difference to the power supply at full charge, the greater the initial current increase.
eg. Using a 16V supply: Approx. 0.6V diode voltage so 0.4V across the resistor and 150mA C/20 gives about 2.7 Ohms; I'd try three ohms.
At minimum charge, 10V, that means 5.4V across the resistor and an initial charge of about 1.8A
The resistor would need to be rated at 10W or higher.
The one thing you cannot do is directly use a DC supply with no current limiting, or one lower than the battery full charge voltage. The battery or power supply would be damaged, eventually if not immediately.