You want to change the middle bit to 0 immediately when the readout is '111'.
It is sufficient to detect '11' in the MSB's. Send those bits to your logic gate.
Put a diode at its output. Point it in one direction or the other, whichever works.
Attach to the 'reset' (I think) of the middle bit.
You may find you need to add a pullup or pulldown resistor, with a sufficiently high ohm value so as to permit normal operation at all other times.
- - - Updated - - -
--------------------------------------------------------------------
As an alternate, does your LSB send an underflow when the count transitions from 000? Take advantage of that as a signal to change the middle bit to 0.