A bow-focused martial is going to have sharpshooter, which puts them far ahead in range damage compared to cantrip slinging caster with the exception of a warlock (which is balanced around eldritch blast anyway). Let's just compare a high level ranger vs wizard vs warlock on this. Rounding up fractions on medians.
11 Ranger with 20 Dex, Hunter's Mark spell (1d6 extra weapon damage) Archery Fighting Style (+2 to hit with range), +1 long bow, Sharpshooter feat (-5 to hit for +10 damage): +7 to hit, 1d8+1d6+16 piercing, two attacks. Minimum 36 piercing, median 50, max 60.
11 Wizard with 20 Int, +1 spell spell casting focus: +10 to hit, 3d10 fire damage with Fire Bolt cantrip. Minimum 3, median 18, maximum 30.
11 Warlock with 20 Cha, Hex (+1d6 necrotic), +1 spell casting focus: +10 to hit, 1d10+1d6+5 Eldritch Blast (3 separate attack rolls). Min 21, median 45, maximum 63.
I used ranger for this example because a level 11 fighter would shit all over the others in this contest with their 3rd attack. Cantrips are fine for this edition and only get broken if the DM is foolish enough to let a hexblade warlock get his grubby little paws on a set of illusionist's bracers and turns himself into an arcane shotgun firing 8 beams in a turn that do 1d10+2d8+11 damage each at end game levels and critting on a 19-20.
Congratulations, you proved that a dedicated ranged build beats a completely vanilla Wizard at damage per turn with cantrips only at level 11.
It doesn't account for the fact the Wizard didn't need any kind of specialization to get those 3d10 at level 11, or the
16 spell slots the Wizard gets per long rest, or all the damage/utility effects of at least four other cantrips they get to use at-will. And the Wizard can still deal all that
magical damage while disarmed, and never runs out of ammo.
The problem with nerfing casters is that it does not magically make martials fun to play.
Absolutely. Martials need to be able to do more than just roll for attack, miss, and then stand there sucking their thumb for the rest of the turn. 3.5e at least gave you a few more options in terms of maneuvers, and Attacks of Opportunity were easier to trigger.
Battlemaster was a step in the right direction, but with Power Attack and Cleave (now costing a Bonus Action) being limited to Great Weapon Master, and with the "interesting" melee options being heavily limited by resources (superiority dice, ki, etc), and with how 5e combat drags on, it's
still very easy to just spend multiple turns doing the "swing, miss, wait" dance. I help with demo games a lot, and a ton of newbies we've introduced to the game talked about how frustrating it was to be limited to just saying "I attack", getting a string of bad luck on the d20, and spending three combat encounters being used as a punching bag with zero kills to their name.
Anyway, I'm actually quite happy with casters in 5e as far as their actual level 1 to 9 spells go. They're pretty balanced. My problems with cantrips are that 1 - they're as powerful as ranged weapons up to level 5, and still competitive past that; and 2 -
they're completely free and require nothing but their voice and their fingertips. A fighter can be disarmed, a rogue can be caught by surprise without her daggers, a ranger can run out of arrows, but as long as they're above 0HP a spellcaster can keep chucking cantrips around without any kind of limit or requirement. And it's all magical damage, which is rarely if ever resisted and automatically grows with level (while non-cantrip spells require you to upcast), and many of them don't need attack rolls so they don't even care about being Restrained.
I get they were trying to give spellcasters something to do when they're not casting something that costs a spell slot, but they've gone too far with it. I'd much rather spellcasters got more weapon proficiencies (as I said, my 3.5e Sorcerer could still contribute with his crossbow), or simply focused more on
wands as a source of damage for them. A Wand of Fire Bolt with 10-20 charges (regaining them after a long rest) is a perfectly fine source of ranged damage for a spellcaster. You can even do the +1/+2/+3 thing with them by having each improvement add 1d10 damage, just like cantrips currently do with levels.
Simply solving the problem of spellcasters not having anything to do while not casting magic with "more magic" was just really fucking lazy.