Here I'm going to ask what you mean. Playing at optimal levels
is min-maxing as I understand it.
One of the abilities PCs have is that any time they control the pacing they can use a full loadout of spells. Apparently either you don't ever allow them to do this (IIRC you've said you always sling at least 3 encounters/day) or they don't use it when they have the chance.
Part of D&D as intended is for the PCs to play it smart.
The 15 minute adventuring day is
a necessary consequence of daily recharge cycles, the PCs playing things smart, and handing control of pacing over to the PCs. If you're going to risk life and limb there is very little reason not to go in fully loaded if you have control of the pacing.
The Kingmaker AP is one where the pacing is largely down to the PCs. That's part of the
point of a sandbox. Which means that if the PCs aren't doing it they arent using the tools they have available.
And my comment on the
is that they probably didn't hard enough. The more you use the fewer you lose - and if they were purposely holding back, that will have contributed to their defeat.
Of course the whole problem vanishes if no one is playing a full caster. Or the cleric's playing healbot.