On at least two occasions when cavalry was used in charges, it was "wiped out." These include the (in)famous charge of the Light Brigade at Balaclava, and Marshal Ney's cavalry charge at Waterloo.
These charges did succeed after a fashion, however. The Light Brigade spiked a battery of guns, and the sacrifice of Ney's dragoons cleared the way for a (short-lived) infantry advance.
The Confederates launched "Pickett's charge" (of infantry) on the third day of the battle of Gettysburg (coincidentally or otherwise following the arrival of J.E.B. Stuart's cavalry).
Do the above, or other historical examples indicate that the Confederates would have done better to have the cavalry lead the way, e.g. to silence the Union artillery that devastated the Confederate infantry ranks? (The purpose of the cavalry was to "exploit" the infantry charge IF it broke the Union line.)
"Better" in this regard does not mean that the Confederates would have won, only that they would have "upgraded" their chances from "none" to "slim" or reduced their prospects of defeat to "a chance versus a certainty."
Confederate general James Longstreet was quoted in the Killer Angels (book and movie) as saying, "No 15,000 men could take that hill." Would 23,000 men (8,000 of them mounted) have had a better chance?