It's far simpler to start from scratch than rebuild the AC charger.
As long as you are using a "bare" solar panel (no internal backup battery).
Just feed it through a schottky diode to a single cell AA holder.
Add a simple "shunt voltage regulator" set for around 1.5V across the holder, to dump excess energy once the cell is fully charged.
eg.
https://www.arrow.com/en/reference-...nt-regulator/7cadb87ba73b5c87dd48fb48ddc98856
The TLV431 will start to draw current if it's reference pin rises to around 1.25V.
https://www.onsemi.com/pub/Collateral/TLV431A-D.PDF
A 100K preset for R1 and 390K for R2 should give a reasonable adjustment range.
It will only draw a minute current from the cell when there is no illumination, 3 - 4 microamps, so should have no effect on charging performance.
R4 should be OK with eg. 10K
R3 is only needed if the power source can supply more current than the shunt regulator can safely take; it should not be needed with a small solar panel.
Adjust the preset to 1.5V or a fraction less once the NiMH cell is definitely at full charge & the solar panel has full illumination.
(The first link is a variation of the example in figure 21 of the TLV431 datasheet).