Maybe this is why this problem never seems to happen to me in real life? I don't play with dm's who wouldn't let a fighter build a raft. Maybe not as easily as using a spell slot, but if you have the time then it goes to whoever would know the most about boats.
I've also found that, at least in 5e, the fact that you can't prepare every spell means that in practice you can only do so much. Having the right spell for every situation assumes you have an infinite spellbook and a long rest between knowing what you're up against and needing to act on it. That doesn't seem to come up much when I play but maybe I'm the outlier?
Wizards certainly don't have all the spells available to them in my game either, nor have I seen it in any game I've played where we always know exactly what spell is needed. Scribing spells into your book is expensive unless you just throw tons o' cash at the players. It also assumes that they have access to every spell scroll under the sun. Limit any of the options and the "If the wizard can cast ..." largely goes away in my experience.