Generally no. The problem with pistols is that they're a clumsy and far more inaccurate weapon than a musket. As such, pistols are mainly seen as self defense weapons with Napoleonic cavalry rather than primary weapons, even for troops such as Dragoons or Chasseurs a Cheval whom had training of firing from horseback with short cavalry cafbines.
Napoleonic cavalry returns cavalry into a shock role more inspired by the battles of Alexander and Caesar than Guastavus Aldophus. With a melee focus, cavalry would keep their primary weapon on hand, which can't be sheathed during movement or held in your other hand which grips the reigns. Napoleonic cavalry had one of two types of swords, a curved sword meant for passing, ride by attacks from light cavalry on troops in open order or running away or long straight swords used by Dragoons and heavy cavalry (such as Cuirassiers) that we're meant for stabbing. Napoleon was even known to yell at his Cuirassiers during the Battle of Jena to stab, not slash with their sword as the stab would be deadlier.
With this in mind, there are three options of defeating an infantry square. First is to bring infantry up to fire upon it. Without the full unit in a capable firing position without breaking square, the square is vunerable to either the infantry pouring lead into it or the cavalry that can rush in when it breaks square.
Next there is artillery. Either at long range with solid shot or short range with cannister can break open a square much easier than anything else. Infantry squares were always an ideal target for artillery teams.
Finally, there is specialized cavalry. Napoleon, being highly impressed with Polish cavalry armed with lances in Spain, decided to transform several dragoon regiments into light cavalry lancers (cheval-legere lanciers). They would be able to poke at the enemy but at danger of being shot.
Pistols and caracoles lose ground with musket armed infantry able to fight back. By the Napoleonic era., the musket is the best it will be until the introduction of the minie ball.