If I understand this correctly, this will prevent cocaine users from getting high. But how does it affect the LD50 (dosage sufficient to kill 50% of the population)?
A cocaine user decides to get high after being "immunized." He snorts a few lines. Huh. Nothing. So he snorts more and more... at some point I am willing to wager he will suffer cardiac arrest or some other life-threatening problem on his quest towards getting high. If the LD50 is not much changed, this may occur pretty easily.
Also, cocaine has a very rapid onset. I am thinking it wouldn't take much to overwhelm the slower immune system response.
This is an interesting experiment as it is always worthwhile to better understand the immune system, but I think this would be a Real Bad Idea to actually implement. Unless the objective is to kill all cocaine users.