D&D 5E has a lot of basic similarities to older editions of D&D in terms of its overall ease of access and core simplicity. It does not, however, emulate the struggle of 0E, 1E and 2E era wizards all that well because at-will magic is diametrically at odds with the idea that magic is potent but suffers from attrition. The 5E rules do account for some of the other limiting factors in prior editions (to varying degrees) such as material, somatic and verbal requirements....but cantrips remain "free."
The DMG provides some guidelines on gritty rest rules that turn short rests into day rests and long rests into week-long affairs. This caps magic recovery significantly but has no impact on at-will magic and in fact could accidentally turn wizards into cantrip gunslingers if your campaign's pacing outstrips the gritty rest rules. There are also spell point mechanics, but those achieve different results than I'm thinking about here....which is to dial back the at-will magic entirely.
There are two ways you can get 5E back to a 0-2E era style of spell casting fairly easily, the "minimum use" method and the "limited" method we'll call them. Here's the house rules I'd suggest:
Minimum Use Cantrip Method: the # of cantrips you get per level is also the number of cantrip slots you get per day; and these slots expend. A character with 4 cantrips under this method prepares up to 4 cantrips and then can cast up to 4 of them per day in any combination. I'd allow the caster to use higher level spell slots to cast cantrips if he really needed to (though for no additional effect unless the DM feels very kind).
Limited Cantrip Method: in this version, the # of cantrips you get per level determines how many you can prepare, but each cantrip can be cast that many times per day as well. So a character with 4 cantrip slots can prepare four cantrips, and each one can be cast four times. This provides more flexibility and casting ability before going for the darts, crossbows and daggers.
There's one more option, which I'll call the Limited Pool Method: in this one, it works like the limited cantrip method above, but you pool your total cantrip slots...so if you have 4 cantrip slots by level, multiply that number my itself to get the total number of cantrip slots available (16 in this case). You can then expend those slots on any prepared cantrips in any combination....so if firebolt is more useful to you than anything else, you can cast it up to 16 times and forget the other cantrips.
Even if you don't use limited cantrips and stick to the rules as presented, I suggest a good house rule for those who value a shred of verisimilitude is to say that the total # of cantrip slots times 10+level is the maximum realistic number of times per day a cantrip can be abused. This will put a stopper to warlocks who decide they want to deplete the pigeon population every round with their eldritch blasts. No one's specifically tried to abuse this (other than myself, on a couple occasions!) but it's my top gripe with at-will magic: it's clearly a mechanical contrivance to make the spell casters more generally useful with non-depleting magic, but the Unfortunate Connotations for the game world are something to ponder when spell-casters everywhere can indiscriminately cast destructive magic at a whim, up to ten such spells per minute, in to perpetuity.
Anyway, I don't think any of the three methods above would break the game one bit. They would both allow you to get your 5E game back to a style where spell casters do eventually run out of magic and need to pull out some melee and ranged weaponry, and make the "mundane/physical" interaction of the casters a bit more relevant. It helps improve the resource management of the characters as well. As DM you need to keep in mind that the player characters have a reduction in the per-round potential of their casters, so they will behave a bit differently and the overall challenge the group will face counts for more as a result.