If this is a chronic condition (seems so) then the initial cause must be pinpointed.
It could literally be any number of things causing this.
Allergies, thyroid issues, Cushings disease, etc....
Once you pinpoint the cause (or rule out things) you will be closer to correcting the problem.
Continued development of the infection with trips to the vets office and then medicating can get old after awhile! I'd work with your vet to figure out the CAUSE of the infection and then concentrating on the specific issue to help ward off the continued infections.
You could start with a change of food (low quality food and those with grains...higher carb content) are good "ear infection culprits" *if* the dog has issues with certain ingredients. The only investment with this option would be the time that it takes to narrow down your NEW food choice and then to slowly transfer your dog over to the new food. If the food was the cause it can take WEEKS, even a few months of being on the new food to notice a difference.
You could also opt for further testing (outside of the ear--no pun intended) and see if something is amiss elsewhere in the body that could be creating this chronic problem.
Depending on your dogs age.....
If you are dealing with a PUP, under a year I'd try the food change first and foremost. Cushings would be unlikely (not totally out of the realm however) and thyroid-ITIS can show up between 6-9 months at the earliest...*think puberty*.
Of course it could also be just a rare thing going on and treatment in the past hasn't been geared specifically to what the ACTUAL infection is. Has the actual infection in the ears been accurately diagnosed as "just an infection" a "yeast infectoin" a "staph infection"??? Different infections require different meds.