The main pitfalls with replacing a PC is, of course, that the players would kind of notice an extra 'PC' in the party, and if you replace one then they're not playing and that sort of gives the game away.
You've mentioned that removing the player without the others noticing is difficult- and it really is, because unless you segregate your players for an extended period (which IMO ruins the game experience), you run into the issue of the players talking outside the game, and the main group goes "So yeah, the DM NPCized you for a bit while you were away." or whatever. Even if you tell them not to, they'll talk outside the game.
In my personal opinion, my best bet is to insert your BBEG as a healer at the local temple. As they're walking through town, someone pickpockets them or attracts their attention. They run down an alley, and a pair of mooks up on the roofs spray them with aboleth mucus.
The party loses the ability to breath for an hour. This would kill them, but if you have a construct PC (you haven't mentioned their race/classes), or an NPC walks by at an opportune time or even the assailants themselves- someone races them to the temple for healing.
Time it so that they all black out, but don't die because the local priest managed to cure them of the effect. Aboleth Mucus isn't a poison, but it might as well be- and for these purposes you could probably consider it one.
The point here is that the BBEG heals them, and replaces one of them covertly (while they're unconscious). So now he's a PC, and one of his minions poses as the priest.
Take the player aside during your mid-session break (if you don't have one, have one) and basically tell him that his character is getting really angry at the other PCs, especially when they make stupid choices, if he's not the leader, tell him that his character is starting to think he should be (the leader), and that he's feeling very full of himself. Let him RP that without leaving the party.
Don't tell the player that his character has been replaced. Don't tell the other players. Don't mention it until they either 'catch' him or unveil the truth.
What you can do to make the experience more interesting to that particular player is to run interludes. Drug him- anything to put him in a trance state, and run him through several 'dream sequences'. The rest of the players can be present for these- it doesn't really make any difference, save for enhancing the reveal.
Let's say that the replaced player wakes up in the BBEG's castle or base or whatever and has several fifteen minute interludes (once per session, taking place before, after or during whenever the party sleeps), where he explores this strange unknown place, avoids monsters, and tries to 'wake up'- and if he's particularly good notice that he's not dreaming- he's drugged.
Do the big reveal (because why else swap a PC if the players never know?), where basically he escapes and makes his way to town (or back into town if it's an underground lair)- and the drug starts wearing off but things are still hazy...
Then swap back to the party and they're walking along when they see someone in the distance, stumbling around. A pair of priests are chasing him- but he's swinging a sword (or whatever that PC's weapon is) at them and yelling at the 'monsters' to stay away. The PC's then get to either subdue or talk down this guy.
Have them make spot, listen, and intelligence checks throughout the combat to recognize that this is a member of their party. If the player who has been replaced (it's his character) succeeds on any of the checks, tell him "You see the madness in this man's eyes and know that he only cares about your death. Your companions will try to be lenient, but you know the only way to stop him is to kill him"
Have everyone roll init- if the other players try to take him alive or otherwise talk him down, the BBEG's player rushes in to try and kill him. If they stop him (the BBEG) or whatever, tell the player to "Tell the party something only you would know."- and he says whatever.
Then assume narrative control and go "The man you've been beating on swears that he is [PC name] and tells you [something only PC could know]- he's been replaced by a doppelganger!"
The party will flip out, I guarantee it- they'll immediately try to attack the BBEG- but have him activate his ring of invisibility the moment their backs are turned (like, if they expressly say "I watch [character who is actually the BBEG]" then find a creative way to escape, otherwise he vanishes when they're all looking the other direction.
And then.... leave them with the paranoia.