Second, though, you left out morale. Consider the following units, from the same period:
Caracolle cavalry versus Maurician infantry
Cavalry attack 2 versus infantry defence 4.
Infanty attack 6 versus cavalry defence 2.
Galoop cavalry versus Gustavian infantry
Cavalry attack 4 versus infantry defence 5.
Infantry attack 7 versus cavalry defence 2.
Arme Blanche Cavalry versus Redcoats
Cavalry attack 5 versus infantry defence 10.
Infantry attack 8 versus cavalry defence 3.
In other words, most of the time the cavalry will have its morale destroyed and flee the battlefield while the infantry are still standing. They'll do more damage while they're around, as your analysis shows - but that won't help them when they retreat with zero morale and get insta-killed by a stack of 1,000 men in the next province.

In other words, it seems that the best army is a balance of cavalry to do the killing and infantry to soak up the losses and make sure the army still holds the field at the end of the day.