Patton had difficulty with the fortifications of Driant in WWII. I have been there, and even with nukes, it would be hard to dig motivated defenders out of that hole.
In the Franco Prussian war the French muzzle loaders cannon were matched against Krupp 6 pounders breech loaders.
In the Franco Prussian war the Germans managed a local battle of encirclement at Sedan. In WWI they went around, but were to send an army around Paris. In response to the BEF, the far right army pinched inside Paris, thus losing the ability to encircle, and indeed having to strip off assault forces to protect their flank. The diminished assault forces of the far right army led to a gap between the two right most armies, which was screened over with cavalry. (a lot of cavalry, but still unable to hold against a coordinated attack.) The professional BEF with Lewis machine guns punched in the cavalry and the far right German army fell back. It was not the end, or even the beginning of the end, but the end of the beginning.
Maxims and Enfields, the Lewis came later. Plus they entrenched.