Can I offer a different view on this?
Repeated ear infections can be due to allergies and it can therefore be worthwhile considering whether there is an allergy to any foods (not just grains). However food allergies are not the biggest cause of this type of problem and it could be an allergy to something in the environment.
What it almost certainly isn’t is anything to do with is the consumption of sugar, whether added to the food or created by the body from carbohydrates. There are lots of reasons why feeding refined sugar to dogs is not a good idea but yeast infection is not one of them.
I have not seen any evidence to show that there is a link between sugar consumption and yeast infection. As far as I can see the idea came from a book in 1983 by an American, Dr Crook, who picked up the work of a Doctor Truss. Unfortunately, Dr Crook did no research to establish whether the theory had any basis but he proposed that there was a major problem with something he called “candidiasis hypersensitivity” – a collection of diseases that he attributed to yeast overgrowth. The American Academy of Allergy, Asthma and Immunology has dismissed this concept as speculative and unproven. However, many of alternative practitioners have picked up various aspects of this in order to promote their ideologies. The referenced video is typical of this and is a gateway into many other pseudo-scientific ideas.
Of course, if I’m wrong about this and there is evidence to support a causal link between sugar and yeast infection I’d be happy to see any references.
I’ve had an allergic dog with repeated ear infections and found that a regime of regular ear cleaning along with removal of one food from the diet helped us to manage the condition effectively. Of course all dogs are different and the severity of the allergy is different. I think that your objective should not be to remove sugar (or carbohydrates) from the diet, but to try to see whether there is any allergy or intolerance to any foods and then work closely with your vet to manage the condition. The lengths you go to on that will depend on the severity of the problem.
Good luck with whatever you choose.