The problem with using dirt from outside is it can harbor unwanted pathogens that can explode in closed conditions with two of the very things that make them grow: heat and humidity.
Whatever the root cause it definitely looks like it has become irritated or infected. If fungal, antibacterial ointment will do nothing to kill the infestation. You could try antifungal cream but I would not recommend it personally. A vet visit is worth the knowledge of what it is instead of just throwing remedies at it in the hope of finding a solution.
As you stated, it has come back and more numerous so please for your happiness and your snake's health, please get it checked by a vet.