One of the problems in kotc 1 was the fact the enemies acted too artificially: no matter the type, be it a simpleton gnoll or a cunning, century-old lich, they all seemed to act like optimized machines, never panicking or making a wrong move. That added to the puzzle-like feel of the encounters: they unfolded in one general way and had their own hard counters. Sure, a wizard that always uses a fireball against your blob of a party during the first round is "optimal" as in "it decimates the player in the most effective way", but it also creates this immersion-breaking feel like you're solving a predetermined puzzle, not surviving an emergent scenario (case in point, feeling like a slave to the initial initiative roll).
Adjusting the various numeric values of the encounters is a tried and true way to tune them, but having multiple options that affect how "optimal" the enemy AI acts would be so much better. Scaling it with enemy intelligence would be perfect, but I doubt it's achievable in any reasonable amount of time. An animated portcullis that is stuck in the loop of the "ready for approach" command shouldn't happen unless you're playing on some weird challenge difficulty setting.