Encounters should be engaging, and exciting. This could be in the form of difficulty, but also in the form of complexity. In the end, I want my players to feel triumphant, and like heroes. I want them to have epic moments, and close brushes with death. Most importantly, I want them to have fun, and be engaged.
I tend to mix up the difficulty. Some encounters rely more on entertainment, rather than difficulty. Others are not difficult, but have unpredictable outcomes that make them an exciting brain exercise. Occasionally I throw my players an easy encounter, just so they can feel strong.
But when it comes to important battles with important villains, that is when I turn up the difficulty. I think a big battle with an important foe should be dangerous. I want them to incur injuries, and maybe even have some of their characters be reduced to 0 hit points.
It is important to realize that being reduced to 0 hit points is not the same as being killed. There are many ways for players to recover from being 'downed'. And so I often plan by big battles to be enough to down one or two players. This makes it feel like they almost died, even if there are many ways to get back on your feet with a little bit of teamwork.
My encounters can also have other lose conditions, such as an important npc biting the dust, or an important resource being captured or destroyed. If the villains accomplish their goals, the players still lose, even if they don't die.