If you run your bird always lathered, you are going to lose a lot, regardless of your bird's stats. Racing is a balancing act of pushing your bird to get/stay in front and pulling it back from a lathered state often enough so you don't run it into the ground. Higher endurance will give you a bigger cushion and allow you to do more running between the times you push your bird and when you have to pull them up to conserve stamina.
My advice- don't ignore cunning. For 2 of the 3 tracks, it will be more useful than endurance. In my experience, acceleration is the most worthless of the stats. It really only matters in 2 situations- getting out front early or escaping from an aoe power-up like thorns. In the first situation, if you want a front-running bird that gets out of the gate quick and stays there, it's better to pick up the Headstart ability and run with a speed/stam/3rd stat build. For the second reason, you will almost always have more options to escape aoes besides out-accelerating the other bird, so it is situational at best.
My 4-star, ped. 9 bird is trained in max speed, stam, and cunning, with the rest of the left-over training sessions dumped in endurance. I feel it works since with him, I have over 300 wins in the R300 bracket alone. Sagoli Road (the shortest, flattest track) can be a little touch-and-go if I get a tough NPC bird like Star Breaker and bad luck on the power-ups, but he absolutely kills it in Costa del Sol and Tranquil Paths.
Keep in mind also that the Abilities you train your bird with will also influence which stat build is best for him. For example, a Headstart bird like I mentioned before might preform better with a speed/stam/end build but my Speedy Recovery bird does better with a speed/stam/cunn one. But in general, one of those two stat builds will usually the best choice and should be fine for just leveling a bird to 40 to retire and breed it. It's entirely possible to still win even while using cheap feeds and skipping training sessions for breeding birds if you want to save MGP. It's the perfect 4-star, ped. 9 birds that you want to really invest in to min/max the training sessions and pair the right stat builds with the best abilities for it.