Considering this further: No, I was wrong, and moogle’s solution was closer than mine. It is 7 races.
As before, in the first round, each group of horses runs a race, making 5 races in the second round.
Then, in the next round, there is just one race, with the first-place winner from each group from the first round. As before, the first-place winner from this race is first-place overall, and need not run another race.
In the final round, both the second-place and third-place winners from the first-round group that the overall first place ran in need to run, because all of the top 3 might have ended up in that group.
The second place horse from the second round, and the runner up to that horse from the second round also need to compete in the final round. The lower places don’t need to run, because the third-place horse is slower than the second-place horse from the first round, which is slower than the first-place horse from that round, which is slower than the first-place horse from the second round. Thus, we know there are 3 horses that are faster than those horses.
Likewise, the the third-place horse from the second round is, at best, third-place overall, so none of the runner-ups which that horse beat in the second round need to compete in the final round.
Therefore, in the final round, the 5 horses are the second- and third-place horses from the second round, the second- and third-place horses that the overall first-place horse outran, and the runner-up from the first-round to the horse that came in second-place in the second round. The top 2 horses from the final round are second- and third-place overall.
So, there are 5 races in the first round, one in the second round, and one in the final round, for 7 races in all.