The DMG outright states that a cantrip shouldn't offer healing. The obvious problem with a healing cantrip is that the party could heal up after every encounter. But what if the cantrip was only usable during the fights, e.g. by requiring that the healed damage was dealt within the last round?
It feels that this could be balanced by considering that if a character spends their action healing, they are not dealing damage. Therefore, the monster dies slower, dealing more damage to the party. If the healing cancels that damage, we're even. For example, assume that a monster deals 10dmg/round and dies in 3 rounds if all 4 players hit it. With 3 players, it dies in 4 rounds, dealing an extra 10 damage. Spreading this over 5 castings (4 rounds + 1 extra after the combat ends), a cantrip that heals 2 sounds reasonable.
I run some numbers using the recommended HP/DMG by CR stats and having players dealing 1d10+4 (scaled at 5/11/17) and hit rates of 0.65 and 0.4 for the players and the monsters and it looks like the cantrip should heal 3.6hp, so 1d6 (scaled to 2d6/3d6/4d6 at 5/11/17). Something like:
Within one round after someone takes damage, you try to mend their wounds and revert up to 1d6 of damage (no more than the damage dealt). This is not considered a hit point restoring effect. Higher levels: prevent 2/3/4d6 at level 5/11/17.
At low levels it's balanced against Cure Wounds, which heals over twice as much, then it becomes obsolete (but so do damage dealing spells). Another possibility would be having a medicine check, possibly based on the monster's save DC and increase the healing a bit.
Does this sound reasonable? Am I missing something? Obviously fights will take (a bit) longer, but that's acceptable. I'm more concerned about the balance of the intended usage (during combat only, when spending an action to cast it is meaningful), as opposed to an exploit to gain unlimited healing.