Generally, I don't see the imbalance in the spell as written. The caster could be using spells that are bigger area of effect, doing more damage to more people, and having much more impact on the overall battle.
Also, spellcasting monsters rarely have War Caster or Resilient: Con. Focus fire on them. Force CON saves. Even if it's a piddly arrow or sling, minimum DC 10 checks add up. Casters that have Heat Metal also tend to be controllers, and they should be prioritized anyway.
Can't do that because they've hidden themselves? Cool! They then can't cast other spells at the party, so their total damage output is reduced, and the effectiveness of the enemies as a whole is reduced. That Cleric will soak a few rounds of damage, probably have to blow a healing spell on themselves, but that's better than the Heat Metal frying them while being peppered by attack cantrips at the same time.
It's also less damage per round than a typical Warlock cantrip.
--
Specifically, in the jungle case, I'd think it through, sandbox-style. Do these lizard creatures face humans often? If so, how many of them are from metal-heavy cultures? Do they have any metal in their own culture at all? How advanced is their tactical thinking? Are they currently at war, or would the groups they encounter be more of a scouting nature?
Now, once they party encounters them: Have the parties let any survivors go, who can go back to the rest of the community and share what they saw of the invaders? How much time has passed since the party got there? How many casters are there in the entire local lizard community to draw from?
That way, you can think of it in context.
I could totally see this: the first few sorties of lizard creatures the party encounters are optimized for jungle foes. If they let any of them escape, however, then the group as a whole can prepare better. Maybe one of them saw the 'metal one' cast spells and knows how dangerous that person is. In 24 hours, maybe a few of them prepare heat metal in anticipation.
If the party blitzes into the core of the lizard community before 24 hours have passed, they won't encounter it. If they spend a long rest before getting there, however, they'll face the spell.
Also, the closer they get to the main lizard creature home, the more likely it is they encounter older, more experienced casters who have dealt with human incursions before. There probably aren't many of them, but a couple might have enough spell slots that having it 'in case' is legit. So, the party will only face them as the danger ramps up and they're in the heart of the community.
But, if the party is fast and ruthless enough, they will only encounter it a few times, because they didn't give the lizard people time to prepare.
See what I mean?