That would be fine, but buff debuff control & so on were also knocked silly by monsters combating the LFQW of old editions, spells being downtuned to avoid LFQW, & concentration being overused on basically everything in their wheelhouse. Meanwhile the damage from those cantrips is almost meaningless to their role in the party so can not posibly make up for the disparity. It's a problem of "they can do something" not being enough to justify the resulting hamstrung disparity between roles once you pile everything on the scalesNot so. The cantrips work on clerics (who are hardly glass cannons) and warlocks (who are only slightly glassier). And alchemists if we're going outside the PHB.
The huge thing here is that martials should be winning the combats, all else being equal. If you're trying to balance across all three pillars rather than for just one then spells have a clear and obvious advantage. So the fighter ought to be the strongest combat. The clue's in the name "fighter"
Turn it around. "casters can do something in some contrived highly specific noncombat situation if the spell is known/prepared" is so squarely in "What Kind of Lame Power Is Heart, Anyway?" that nearly every condition for it is met