When clients report that their dog is going potty numerous times per day and they are having house training problems, I always recommend that they look at the quality of the food.
Inexpensive foods that contain corn, soy, grains and animal byproducts are usually not utilized as well by a dog's body and therefore are eaten during breakfast and dinner and are excreted during potty breaks in large, often extra smelly quantities.
It is important to look at your dog food's ingredients and look for a meat product as the first ingredient without a lot of grains or byproducts. The cheapest foods have corn as the number one ingredient. Most people would agree that corn is not a good ingredient for dogs.
I feed my dogs a raw food diet consisting of raw chicken, buffalo and other raw meat products supplemented by high-quality store bought dog food. It is a fairly expensive and time-intensive process because I buy whole hormone and antibiotic-free chickens and cut them up myself. When I have time to feed them mostly raw food, their waste is surprisingly small. The more kibble I feed them (even though I only feed high-quality food) their waste is noticeably more voluminous.
While it is not feasible for everyone to feed a raw diet, you should do the research and feed the best quality dog food that you can afford.