Best way to stop a cavalry charge is to hurl peasants at them until the cavalry have to charge uphill to get at your men.
And, of course, horses usually have more trouble than men getting traction on a massive pile of dead people slick with blood and assorted internal organs.