Having done this several times, to great effect, here is my advice. (In fact, I am a
player in an evil campaign right now.)
First, there is a difference between someone who is
evil and someone who is
totally 100% evil all the time towards everyone, no exceptions. Encourage your players to create evil characters who can work with others and who WANT to work with others. Both fiction and history are full of evil people who had friends and allies just like everyone else.
Second, reinforce the above by giving the players a reason to work together. An evil patron is a good reason. But, good-aligned enemies are also a good reason. Or, give them a common evil goal: maybe they are servants of the same evil deity, or members of the same evil family (they want their family to rule the world; individual rulership isn't as important).
Third, aim towards cartoony evil. Rape and torture and mutilation are NOT fun. James Bond-villain death traps are fun. Mind-control is fun. Threats and coercion are fun. Betraying the good guys is fun.
Fourth, make sure they have enemies who are
even more evil than they are. In my experience, players enjoy the freedom of playing evil PCs -- but they still crave that sense of righteousness that comes from stomping some







into paste.
Fifth, talk to your players about all these things beforehand. Make sure they understand what you are going for and that they are on-board. Some players don't enjoy evil, and others don't understand that playing an evil PC is not an excuse for being a jerk to your fellow players.
Personally, I think your idea of betraying the party in an "endgame" does not sound fun. The problem with PvP games is that they lead to too many secrets, and secrets can be toxic. I mean secrets between the player and a DM. It can feel very unfair, like the DM and the other player are engaged in a different game entirely, and you are cut out of the loop.
Instead, I'd do something akin to
Survivor, where PCs vote each other dead. Or maybe take a note from
The Mountain Witch, and have PCs throughout the campaign give each other "trust" points, which they then use at the endgame to stab each other in the back (whoever has the most points, wins). Or, just track Evilness throughout the campaign, and the evilest one rules over the others. It's hard to pull off, because you don't want the "losers" to feel cheated.