Is your affected toe red, swollen and warm to the touch? Are you noticing any discharge from the affected toe?
I am guessing that the first infection was never completely cured. You may have an underlying vascular condition that is preventing healing of your toe. Wearing closed toe shoes without socks could have caused bacteria to grow and exacerbated the infection.
I suggest that you consult your primary care physician. You may need a prescription for an antibiotic. You need to soak your affected toe in a bath of warm water and Epsom salts at least twice a day.
A proper physical examination by a physician and a recommendation for a treatment plan may be the way to stop your suffering.