It's a popular idea, but in reality, there's little no evidence that cayenne pepper has any effect whatsoever, preventative or otherwise, on internal parasites. Those who do feed it, tend to recommend it sprinkled on top of the bird's crumble or pellet ration. It can't hurt the birds, so if you want to feed it, go right ahead - just don't expect it to have much effect.
A more effective option might be oregano, specifically oregano oil. There are quite a few scientific studies linking it to the ability to not only prevent infestations but even reduce and remove existing populations of internal parasites. It's frequently used on organic farms, where they are prohibited from using "real" antithelmics.