The question of "smart" versus "fun" enemies is a bit misdirected, IMO. It's really a matter of good design, planning, and being able to recognize when you've vastly overestimated the party's abilities versus the party heroically (albeit tragically) falling short.
When you create an encounter, you have to account for any possible fail states. If the party falls to enemies, traps, hostile environments, natural disasters, etc, the real question is whether or not you as a DM are willing to kill any or all of the PCs if that is a likely outcome or the only possible outcome.
Most DM's can (and should!) generate plausible outcomes as to why some or all of the party might escape death's clutches, but eventually you have to be willing to put the hammer down if the circumstances warrant a severe and swift conclusion. In the event of a permanent loss of one or more PCs, if the players were aware of the stakes, the encounter was fair, and no one felt like they were cheated, it shouldn't cause too much friction at the table.
Essesntially, the question shouldn't be "are these enemies smart enough to kill the PCs, and if they are, why don't they?" The question should be "if the PCs fail in this encounter, did the stakes warrant any or all of their deaths?"