This is solved by bringing back Domain Level Play, and making spell components a meaningful resource again.
Most spells have a martial equivalent. Give martials access to those effects.
Most spells also used to cost something to cast other than a spell slot. When your only limitation is 8 hours of rest, magic scales wildly out of control.
Or play a system with better design instead of trying to force the wargame to be anything other than what it was designed to be.