That video of Ray doing the first ever recorded Confusion/FB solo of Alakazam has a good Gengar section. I don't think you can do much about it, but I think the best gengar can achieve against Conf Alakazam is:
1. Dodge all confusions if possible
2. Hope Zam fires a focus blast after your shadow ball attack so you don't eat a full confusion
3. Hope Zam fires another focus blast just after you fire your second (maybe even third) shadow ball (gengar will nearly faint by this point) so you actually have time to connect, instead of confusion taking you out before it connects
However I think it is ill advised to use Gengar against a shadow ball alakazam. Isn't it just better to use maxed Ttar and tank the confusion and shadow balls? That's provided that you have them, but I'd rather invest to max Ttar than mex Gengar for this purpose.