Knights from the Feudal age get a lot of press but the general press is wrong on how they were used and how "useful" they were on horse.
In general, the most successful "knights" during the middle ages that actually fought on horseback were the Mongols who used the horse bow - not the charge.
And in Europe, by 1100, most knights preferred to fight dismounted with a polearm - not charging on horseback. Sorry to disillusion you but that reality. Especially after the appearance of disciplined such as English archers, Swiss Pikeman, and, in Northern Italy the infantry never did disappear, the Italian militia, the day of the charge dominating the battlefield never happened.
Between about 600 and 800 AD, Knights/Mounted forces dominated in Europe during the "raiding period" due to mobility, not effectiveness on the battlefield. And as Europe became organized, this mobility became less important. By 800 AD, the importance of the mounted troops was on the decline.
As far as Cavalry during the Napoleon period, please cite one creditable source of Cavalry riding down an infantry square without support from artillery or infantry. As far as I know, this happened exactly ONE time in a 60 year time period. Could Cavalry right down infantry in the open if it caught them by surprise? Absolutely. Was the common? No.
Much more common was the tactic of pinning the infantry in a firefight with infantry and having the Cavalry circle to the flank or rear to attack. When that didn't happen, as at Waterloo, the you get the following:
****
Wellington decides to make a tactical move and withdraw his infantry 100 yards to the rear behind the ridge line where they will be ordered to lie down to present less of a target to the French gunners.
Marshal Ney sees this and thinks that the British are retreating from the field altogether. He thinks that there is a golden opportunity for him to route the British army and win the day.
So he masses 5,000 of the French cavalry and attacks on a front of less than 700 yards.
Lancers, Hussars, and Cuirassiers charge into the British lines. This is a mistake. In Napoleonic warfare, cavalry charges are not normally made against infantry without the support of infantry.
The British artillery pour shot and shell into the French, while their infantry (who only retreated 100 yards) form square.
The British squares are hollow, 2 or 3 ranks deep with reserves in the center. The front ranks kneels with back ranks standing, with fixed bayonets. After firing off another round, the British artillerymen hastily retreat into the safety of the squares.
The French cavalry swarm past the guns and over the ridge only to be confronted by the squares.
The horses are unwilling to charge into a wall of bayonets, and merely end up circling the squares looking for an opening. The cavalrymen reach down with their sabers and lances to hack at the British. French losses are dreadful, but the squares hold.
The French retreat back over the ridge to regroup. As they pass the English cannon, they fail to either spike the guns or turn them on the British squares. Ney reinforces the cavalry with more cavalry failing to infantry or artillery support. Two more charges take place. Again, Marshal Ney reinforces with more cavalry and tries again with the same result, and the same mistakes being made.
Napoleon, observing the charge, comments that it has occurred at two hours too early but reinforces the cavalry with additional cavalry - failing to see the lack of infantry and artillery support. By now, over 10,000 sabers have been committed against the British squares.
After two more charges, the last "charge" being delivered at a walk, due to the churned up muddy ground, and the clumps of dead horses and men. The British hold, but the proud, magnificent French cavalry sustains unbearable losses with an estimated 5-6,000 losses.
And just as a note, horses WON'T RUN over someone with a long pointed stick aimed at them unless you have trained them for a LONG LONG time. And Cavalry after the war horses of the middle ages didn't get that kind of training. You can read a lot of first hand account of horses literally STOPPING in front infantry formations that had bayonets out or formed a square. And you can read a lot of accounts of the riders who tried to get them to "break into" that formation get thrown into those bayonets over the heads of those horses who stopped.