I don't remember who it was, but one poster proposed the idea that a great way to make martials relevant would be with puzzle traps. If two people have to step on a pressure plate at the same time, then the mage can't possibly do it alone right? Wrong. Animate dead, summoning spells, find familiar, the mage is actually fully capable of coordinating with magic and activating up to five simultaneous pieces. There are multiple spells that could be utilized for this.
And what about options that the DM didn't consider? I was playing my druid character in a set piece encounter with a bunch of pirates. A fleet of small ships was approaching the docks and everyone had to prepare. Most of the characters.... hid. There was literally nothing they could do until the ships were close enough for them to engage in melee. My druid swam out and cast control water. Using the spell, I took out two or three full ships of pirates. Then when they were closer, I cast Wall of Fire and took out ANOTHER full ship, by myself. By the time anyone else could participate, I'd massively changed the encounter. "Oh but it was just the one time"? No. I was also a better and more reliable scout than the rogue, I also was on the front lines with the barbarian, I also was the healer.
It wasn't just "the DM designed this encounter with only one solution" but also "The DM wanted someone to lockpick or break down the door and didn't realize Unseen Servant could be cast through the small open window and unlock the door for us without a check". Casters often can use their abilities in surprising ways, because they have SO MANY abilities. Meanwhile... martials just have skills. That's it.