I don't know about pepper spray against bugs.
But I successfully used a tea of tansy (Tanacetum vulgare) against sucking insects like white fly (Trialeurodes) and aphids (Sternorrhyncha).
To prepare the tea, I collect tansy in full bloom, let it dry and chop the whole plant.
From this I cook a strong tea - (one hand full per Liter of water - remove the plants after approximately 10 min. )
After cooling this down, I use it as foliar spray.
Be careful, don't drink this tea. Even though it has been used against intestinal worms, it is toxic to humans, if used in too big doses.