"I wonder how the potential reveal would work though. It seems possible that the players might never discover the betrayal (especially if it was something like possession or mind-control rather than actual replacement by a doppelganger)."
Even more interesting is the case of an undiscovered doppelganger. If we assume the doppelganger killed the PC, what if the adventurers later discover the body? I'd be inclined to maintain the secret even at this point, just to keep the players guessing. Is the PC a doppelganger, or is there some weird explanation for the duplicate corpse?
My solution is that, in the cases of possession or mind-control, or any replacement situation where the real PC is in stasis somewhere, there should never be a reveal until the players have successfully solved the problem. If they suspect possession and seek out a high-level cleric to cast Dispel Evil, you then reveal to the all the players that the PC was possessed and the real PC was only able to watch in ineffectual horror as the evil spirit plotted betrayal. If they are able to force a shapeshifted monster back into its true form, they must either force the monster to restore their colleague or go on a quest to locate their friend. I think the GM should take over the monster once the betrayal has been successfully revealed, in these cases.
The more difficult situation is replacement by murder, as for a traditional doppelganger, or opportunistic replacement when a character gets lost or trapped. But I'm still mulling that over, so I'll tackle it in a future post.