you can purchase it, like you said, there are a bunch of outlets for that.
collecting your own dirt....basically you need to collect it from a grave of someone who died. so if youre doing that randomly, that can work against you.
if youre going to collect your own ...and its probably best that you do... try to find a person that lived or is somehow tied to the intention you have. So for hotfoot powder maybe the grave of a soldier who protected others?
Really look into it though, if you grab something random it could mess you up. Talk to the spirit and ask permission, try to wait for a response, some kind of sign. Talk to the dirt too, tell it what you need it to do with you (all your ingredients need to be talked to)
Anyways, good luck with the job, Hoe it works out for you
For whatever its worth, collecting your own stuff...typically...is better, the whole process is one of mindfulness and connecting with the spirits involved. lus the introspection and focus of doing the job.
One note of caution that I have not seen mentioned yet; Many cemetaries frown on people digging among their graves and may consider it a form of vandalism or defacement. So don't just wander in with a garden trowel or you might have some explaining to do. it sounds silly, but considering how often the wardens have to deal with broken stones, graffiti, garbage, and would-be satanists trying to run through teenager rituals, it is understandable they would want to preserve the grave-sites. So just be aware of local laws and policies, and do your best to work within them.
One trick; especially if you use an earlier suggestion of looking for a soldier's grave, take a potted flower with you that would be viable to plant. Then get in touch with the office of the cemetary you want to gather the dirt from, and ask for permission to plant the flower at the soldier's grave to show respect for a veteran. Leave out the real goal though, it is likely that it would not be looked on with favor.
Maybe even time it to memorial/veteran's day, as it would also connect with the soldier's energy of remembrance, thankfulness, and also the ideas of sacrifice, protection, and war. It serves the purpose of having a way to pay respect to the soldier you want to take the dirt from, offers a positive gift of life in exchange for the soil, and you can just 'leave' a scoop of the soil you dug out for the plant in the pot to take out with you. And you can (hopefully) do it all with permission and even respect from the groundskeepers.
Ideally, the Graveyard dirt would be collected from one of your ancestors. I was looking in a cemetery a while back and saw three graves, they were simply marked, Mother, father, Baby. If I were to take dust, I would go there, ask permission and take a teaspoon from the head and the foot of the grave. Say thanks and leave some flowers or some sort of small offering.