Well you mention undead, and with my love of ghosts and haunted encounters, at least with PF I've been building ghost encounters that always include one or several associated haunts. To me, this turns the scary factor up to 11, and with the back story turns a simple ghost encounter into an investigation for a divine caster or paladin.
For example, I recently built an encounter location for a high level adventuring party following a path through a haunted forest. The ghost is a dryad witch. Following the path, the party is led to a small clearing between three twisted trees which triggers the Lost Grove haunt, trapping the PCs inside. A round after the ground covered by mangled raven corpses are triggered. A round after that, the Thorny Sentinel haunt triggers and the dryad witch begins her attack on the party.
Ella was a 16th level witch dryad with the ghost template. Her coven sisters sacrificed her in a dark ritual of power that killed her in a horrible fashion and cursed her grove and herself to undead status. Finding and punishing her still living coven sisters are required to lay her to rest. The following are the haunts I custom built for this encounter.
Field of Mangled Ravens Haunt, CR 5
XP 1600
NE haunt, 15-ft. radius, CL 10
Notice raven corpses begin to writhe as if still alive, Perception DC 15
hp 10, Trigger proximity, Reset 1 hour
Knowledge (religion)/(local) DC check (20) to learn how these ravens were sacrificed to serve a ghost witch's dark rituals.
Description
On either side of the path strewn across the ground are thirteen, broken raven corpses, which begin to writhe, turning their broken beaks and eyeless heads to face the trespassers. They caw in despair. The sound causes all listeners in this wretched field to become nauseated and begin to writhe in pain like the raven corpses, as per the spell Cacophonous Call Mass.
Destruction collect all raven corpses and burn in a pit with Consecrate cast onto the burnt ashes.
Thorny Sentinel Haunt, CR 9
XP 6400
NE haunt, 1 huge tree and 10-ft. radius, CL 10 Persistent
Notice the branches moving by a nonexistent wind,
Perception DC (19 )
hp 10, Trigger proximity, Weakness damaged by fire, Reset 24 hours
Knowledge (religion)/(local) DC check (24) to learn how an unnatural spirit usurped the life and accursed its existence.
Description
A huge thorn tree begins to animate, attacking trespassers with root and limb, as per Animate Plant and all the ground plants in a 10 foot radius surrounding the trunk attempt to grapple anyone nearby preventing passage by it, as per the spell Entangle.
Destruction an overnight prayer vigil under a full moon must be spent, with Holy Word cast at the thorn tree at first light.
Lost Grove Haunt, CR 18
XP 152,600
NE haunt, 15-ft. radius, CL 16, Persistent
Notice eerie lighting absent of color appears between 3 trees, Perception 18
hp 10, Trigger proximity, Reset 1 hour
Knowledge (religion)/(local) DC check (30) to learn that a dryad ghost witch created this cursed spot in the forest to serve as her eternal lair.
Description
An open space between a trinity of trees of thorn, ash and oak measuring 30 ft by 30 ft by 10 ft high, and 20 ft over the center cube. Strangely the light is missing the color spectrum and everything is cast in shades of gray. Spells that depend on colored light do not function. Once you enter this lost grove, trying to leave the area loops you to the opposite side entering it once again. If the ghost Ella is found within the lost grove, you must defeat her in order to escape. The area manifests as per Create Demiplane with the Shape feature.
Destruction Ella the dryad ghost must be laid to rest to destroy this haunt.
If I were going to do a devil/daemon/demon encounter, I might include a haunt, hazards and most definitely also include a curse of some kind, used similarly as the above scene with multiple elements used in concert to make a 'scary' encounter, really scary. All my major scary encounters are complex integrations of monster, location, haunts/hazards/traps, and minions.