Militarized units always have enormous advantages over untrained and unarmed civilians. These advantages can, however, be turned to weaknesses if the civil force takes time prior to the demonstration and organizes itself into units and practices appropriate tactics. Horses are easily spooked (even trained horses have hardwired instincts) and upset by things like ball-bearings; dogs are ridiculously easy to kill, having only their jaws to use as offensive weapons and being rather dull-witted animals. Likewise police/paramilitaries are at the end of the day comprised of humans who have certain hardwired reactions that can readily be exploited.
Of course nice ordinary middle-class folk don't think of confrontation with armed forces of suppression when they consider heading out for a day of protest, which is why police/paramilitaries have such an easy time of things when they inevitably charge with batons drawn.