The horse charge at Helm's Deep should have been easily defeated, or at least slowed - this scene was a bit unrealistic, but it's PJ.
The orcs had pikes and could have used them more effectively. The horses, coming down the slope, would not have been able to manuever around the defense well, and if the first wave of horses could be checked, those following would have slammed into the first wave, wrecking more havoc.
Also I would have had the crossbowers shoot into the charge, again fouling the attack. Unlike the charge on the Pelennor Fields, the Rohirrim were attacking on a narrow front. A few dead horses tumbling down the slope would have hindered the Riders.
Gandalf, of course, is a completely different matter. Assuming that you do not have access to a powered-up Witch-King

, the next best thing would be to go after Shadowfax. At least Gandalf unhorsed would be a little easier to deal with.
What didn't make a lot of sense was the orcs fleeing from the sunrise/Gandalf's magical Flashlight of Doom. Weren't these the same soldiers that marched etc by day and night?