I believe that pinworms are the main culprits causing hemorrhoids. They drill holes in the delicate tissues of the anus and weaken it, and cause constipation. You grunt to go and a vein begins to bulge. Pinworms hate cayenne pepper.
Is it possible that when you took the cayenne, they all went running down in attempt to get away from it, and there was a traffic jam in your anal sphincter?
Keeping your pinworm load low will minimize the hemorrhoids. Cayenne is a good start. You have to stay on top of it. Do not let them bite your behind without making them just as miserable as they are making you.