By "iPhone charger" I assume you mean 5V 500 mA power source. Note that some USB outlets only provide 100 mA until the device actually answers the USB protocol and requests more than that, although wall outlet based ones will have all the juice all the time.
You can use a boost converter to take the 5V input to a 15V output. Either build one on your own using a switching controller, an inductor, some capacitors, and some amount of diodes/transistors, or buy a ready-made one from vendors like CUI or Murata or RECOM. Note that the current at 15V will be about 150 mA with 500 mA in at 5V and 90% efficiency.
Then, use a charge circuit for NiMH batteries. It's OK to parallel the charge circuit putting current in, and the device drawing power out from the batteries, as long as the charge circuit is properly current limited and follows the battery chemistry charging profile.
Actually, given that 1.2V NiHM cells have a max charge voltage of between 1.4V and 1.5V, 15V may not be enough, given the likely drop in the charge circuit. You may need to go to 18V. If you're ambitious, you could control the output voltage of the boost converter based on the current charge level of the batteries. That'd take some careful design tuning, but would make the whole system more efficient.
Stacking NiMH to get to 12V seems bad, though. I'd rather use something safe like a LiFePO4 battery, and charge that from the 5V (using a direct charge circuit, or using a buck converter that is controlled as a charger for higher efficiency.) Then use a boost converter from the battery to generate the 12V output needed. Again, such boost converters can be hand-built, or can be bought from providers. The charger would connect to the battery. The on/off switch for the whole device would connect/disconnect the battery to the boost converter that goes to 12V.
In both cases, the device could run on charger power, assuming the total draw at 12V is less than 150 mA (meaning total power draw of about 2 Watts or less.)
Best Answer
The problems started when the USB connector of the original device got damaged. Would it be reasonable to repairing the connector? You could also try to bypass the original connector to feed the charger.
Separate charger approach
The proposed approach with separate charger is sound. However, I would look for a charger, with:
At the same time, there's nothing fundamentally wrong with the charger, which you've found on eBay.
The battery pack connector looks like Molex PicoBlade. Here's a 4-pin male (p/n 53047-0410).