Magically hiding your alignment is pretty straightforward. The 2nd level cleric spell Undetectable Alignment makes you immune to magical alignment detection. This would be susceptible to Dispel Magic, so you might want to invest in a magic item that generates a similar effect. An item that constantly protects you with Undetectable Alignment would be 6000 gp.
For hiding your evil actions from the party, take a look at this question: How do I Raise the Dead and Look Good Doing it? That question talks mainly about how to hide your use of undead and necromancy from other people, and has some pretty good stuff in it.
Based on your description of the character, I don't see any reason for him to be doing evil acts outside of using undead. Remember that alignment isn't a straitjacket. If your character's goals before were to help the innocent and save the world, that won't necessarily change now that he's trying to use undeath to protect his life. He's less likely to risk his life to save people, but that's hardly an evil act.
If you find that you do need to do evil acts for some reason, the best way to hide your actions is to do two things.
Give a reasonable reason to be away from the party for a while. You certainly don't want to be sacrificing children in front of the paladin, so you need an excuse to be away from the party. Take a magic item crafting feat, and build a small lab/shrine in an enclosed space, away from the party. That way, if you need to do something bad that takes time, you have a good reason to hang out away from everyone else. You'll want to make sure that anything overtly evil in your lab is hidden when you're gone (preferably behind a wall and past a sheet of lead), but that shouldn't be a problem.
When you're off doing evil things, act cool when you get back. If you spend a few days sacrificing children to your dark god while making magic items for the group, act like nothing is wrong when you get back. Party members generally trust eachother unless given a reason not to. If you say "I spend a few days making those magic items, and here they are", then there's not really an in-game reason for your party to distrust you. If they never look for evidence of wrongdoing, then they're a lot less likely to find it.
One thing to keep in mind is that your party will probably need a very solid split between player knowledge and character knowledge. It is nearly impossible to not make your fellow players suspicious about your evil actions if they're a secret out of game as well as in game. Nothing makes a player want to investigate more than passing secret notes to your GM. You're probably going to want to have a conversation about this with your GM and other players, just to make sure that when people try to find you out, they're doing it based on in-game reasons and not metagame ones.
Countering a specific, known threat as a high level Tier 1 spellcaster is usually easy. This is no exception.
Even without appropriate tactics as suggested by Brian Ballsun-Stanton, there is no reason an epic-level Cleric shouldn't be able to just straight-out tank a pair of mundane warriors.
Fighter incoming? Beat him at his game.
You may have heard that "AC doesn't scale as fast as attack bonuses". Well, that applies to muggles, an epic Cleric really doesn't care.
For instance, the Cleric could have the following:
- Epic Mage Armor. You didn't want the Cleric to have custom epic spells, but this one is stock. If you don't want to spend one of your precious Epic feats on stock Epic Spellcasting, just go with some cheap bracers of armor and make up the difference elsewhere.
- Monk's Belt. I assume the Cleric's Wisdom now cancels out the Fighter's Strength.
- An Animated Shield is cheap.
- Add Magic Vestment to your shield for an instant +5.
Just keep going (Ring of Protection, an Ioun stone, Amulet of Natural Armor if you can combine it with your Periapt of Wisdom) until the desired level of protection is reached. If you don't want the Fighter to hit you, the Fighter just won't.
If you go the AC-pumping route, I'd say the biggest source of concern should be that it makes the mundane party members useless and boring. Don't overdo it.
Sneak attack damage? Fortification.
You may still be scared of a Rogue popping out of some shadow and touch-attack stabbing you in a kidney. An armor or shield of Heavy Fortification means the Rogue's trick doesn't work. At all. No save.
Greater Dispel Magic? There's a thing for that.
Afraid of some uppity mage coming around and target-dispelling a critical buff? You should be, even with your caster level advantage. Which is why I never leave home at high levels without at least one Ring of Counterspells with Greater Dispel Magic in it. (Or a non-core improvement, ahem.)
Regardless, you probably want to have your buffs cast with an active Bead of Karma. That gives the buffs a Dispel DC of at least 38 (11 + CL (23+4)), hard to beat in core with just Greater Dispel Magic (capping at +20).
Just hope they don't think of bringing Disjunction!
Contingency is very good.
You have a Contingency up and running (it didn't get dispelled, see above). In core, a Heal is probably as good as you're going to get. Make sure it is timed (that is, phrased) well!
You might be able to make the attacks exceedingly unlikely to hit by using it to (further) juice up your AC. If you key it to Polymorph (beware of unusable equipment, do your math first!), you could look for a form with high natural armor as the least of its tricks.
Make sure Time Stop goes off.
If you get a Time Stop, the Cleric likely has enough time to get up enough short-duration buffs to survive most things. I consider Spell Stowaway keyed to Time Stop a worthy candidate for an Epic feat.
Now what?
You have done your homework, and have an invulnerable murderous machine of a Cleric. Just make sure your players do have a way of winning. In my experience, high level PCs usually do, but be careful.
Best Answer
Persistent Death ward can protect you from harm. Persistent spell allows the spell to last all day, and Death ward makes you immune to, among other things, negative energy.
Find a very high level paladin or archivist and get an item enchanted with "Favor of the Martyr" (spell compendium) which explicitly protects against Wrack, and all of the status effects that wrack causes.
Unfortunately, these will do nothing against the modal cleric betrayal: "I sneak into his tent, cast hold person on his helpless, sleeping form, and continue onto the rest of the camp. Then I sacrifice them all to my deity." Have a chat out of game about whether PvP is OK, and what form of PvP is a) fun, and b) right for the group.