After much questing, you have finally laid low the BBEG. But the BBEG has powerful allies. Ones that could cast Wish and True Resurrection. So the question is: how do you keep him dead?
Kill the allies. Or at least let them know that you will be seriously displeased if the BBEG comes back.
Unfortunately, although there are things that can prevent it (here is a thread about this from a while back), most of them fall under the GM's discretion. If the GM wants him to come back, he's gonna come back. No Morganti blades to do the deed permanently.
These are probably some of the best ways that PCs can use. When a barghest eats a corpse, only a wish, miracle, or true resurrection will work, and even then there's only a 50% chance of success...failure means no mortal magic can restore the creature (though I wonder about epic magic...).
Likewise, a trap the soul spell will get a character our of your hair, though this spell only works when the creature is alive (by the spell's description, you can't use it on them after they die). I can't recall any similar spells, but I'm sure they're out there.
Finally, it's very unlikely you'll be able to use this without the DM's prior approval, but if you can kill him within the range of the Soul Crusher, though be very careful you aren't killed there.
Death Giants are from the MMIII. They do have a steal soul supernatural ability, and while a soul is stolen, the creature cannot be raised, resurrected, or reincarnated. However, this only works on a creature within 15 feet of the giant, with 10 hp or fewer. They get a saving throw against the ability, and once the giant is dead, the souls are freed.
Agreed. Depending on your ability to keep the enemy's allies from (destroying) the resulting undead, this may or may not be a suitable long-term solution.
Other planes and HQs of powerful people are often good storage places, depending on the enemies' resources. Really, really deep pits/lakes might work as well, depending on what creatures live down there. (Assuming Divination available to them is not an "I win" button for the enemy.) If all else fails, a sufficiently big (for the creature's size, unless you can chop the undead down to size) portable hole or similiar item, carried with you or left in a safe place, might be an acceptable substitute (or at least an advantage).