Its pretty easy for a DM to have any smart BBEG arbitrarily kill off the party while they're sleeping or separated in the city during downtime activity, but that is obviously not fun. That's just laziness. As you mentioned in a previous post, there has to be a balance struck between smart villains and fun villains and it's the DM's job to create fun, challenging scenarios with said villain. For me, its one of the most challenging but rewarding aspects of the game: to plot and conspire against the party using whatever knowledge, resources and limitations that are at the villain's disposal (not the omnipotent DM's), then executing these plans to the fullest in a believable scenario. Whether it means a sweet victory for the party or a TPK, nothing is more fun for both players and the DM than a well thought out encounter with a major bad guy, at least in my experience. My players expect nothing less.Well, clearly the best thing for a lich to do if being stymied by a level 10 party is attack them when they're resting for the night at the inn, killing the fighter with power word: kill. Moving to the next few rooms to kill the wizard and cleric with finger of death and then finishing off the rogue without a flank buddy. If interrupted, sending all its minions at once instead of convenient level appropriate waves. Then leave. If anyone survives, come back after 8 hours and finish the rest.
Really, the lich should just cast divination every seven days and ask "where are the groups of adventurers who might interfere with my plans staying?" And then just kill them.
But I'm not sure my players will keep playing with me after I murderer their characters like that.