Herein I would like to explore consequences of limiting cantrip use.
The main reason is that if we (as a larger effort) tweak the game to reduce the advantages of ranged weapons over melee weapons, this might make minmaxers simply switch over to Eldritch Blast et al.
A smaller (but to me equally important) reason is to me, granting some characters infinite access to magical powers presents large verisimiltude problems. Wizards trivially escaping cells by burning away locks. Entire economies wrecked since nothing needs repair. And so on. No matter how I try to solve these worldbuilding issues, the end analysis is always "the problem is that cantrips aren't finite".
Do you see any major negative impacts on playing the game, if cantrips were, say, limited to 4 slots per short rest?
I'd say so. There have definitely been adventuring days IMC where casters used more than 4 cantrips between short rests. Therefore, this change is a significant nerf to those characters. In particular, it's a huge blow to the Agonizing Blast Warlock, who relies on a cantrip as his primary source of damage.
If you want to reduce the ranged advantage of cantrips, I'd recommend simply reducing the range. As an aside, this would be my solution for ranged weapons in general, if you're having problems with them. Given that you're presumably in a fantasy setting anyway, it's easy to say that the planet has a higher gravity or denser atmosphere than Earth, limiting the distance that ranged weapons can travel. IMO, the 600' range of a longbow is absurd. Granted, it's fine in a war scenario where you're trying to block out the sun with your arrows (quantity over quality), or against an unaware target (like a deer), but if your opponent is aware of you the arc required for an arrow to travel 600' means that the travel time will be absurdly long; the target is effectively working with bullet time, making the attack nearly effortless to avoid.
If you want to avoid casters using Fire Bolt to burn through a lock in a jail cell, just add a material component that they're unlikely to have access to in a jail cell (if they manage to smuggle it in, good on them; they could have probably smuggled in a set of lock picks just as easily). In a high magic setting you would probably have anti-magic cells, or even cells that reflect spells back at the caster making it inadvisable. Additionally, I don't see much difference between using multiple castings of Fire Bolt to get out of a cell or using a single Scorching Ray. Well, one; the guards a lot less likely to hear you and make you stop if it's one spell rather than several. Unless the jail cell is warded against magic, casters have a million ways to escape using magic. Charm/dominate the guard into unlocking the door, just for starters.
As for mending ruining economies, I would simply design my campaign setting so that casters are rare enough that they cannot solve all of the world's problems, and have better things to do with their time than mending shoes and pots. After all, they're not going to do it for the money since someone who's looking to have an item mended (rather than buying a replacement) isn't probably looking to spend more than a few coppers (could be more if the item is particularly valuable, but such items breaking is likely to be a lot less common). That doesn't mean that there might not be a village out there lucky enough to have a cleric (of some kindly deity) who will cast mending on their things. But that's the exception, not the rule. Additionally, this cleric might not always be willing. Perhaps he does so if there is true need, but not if the person has the means to fix it themselves. After all, that sort of lesson is not out of character for a wise man (you can't rely on magic to solve all problems; hard work and effort are their own reward).