The overriding feeling among commanding officers of the Old Army was that percussion caps were too "newfangled", untried, and apt to be unavailable in the wilds of primitive Mexico where the war was fought!
I would think the supply issue was a big part of this decision.
With a flintlock you can fire if you got the powder and shot.
With a percussion firearm you are in trouble without the caps.
And the US army was by the later part of the war operating with only a weak supply line to the coast and then a long long distance across the sea to even the nearest friendly port. And a lot longer to the nearest federal production facility.
And powder and shots could be captured and found to some extent locally. Not so for percussioncaps.
In 1848 when the 1st Slesvig war broke out both the "danish" government army and "Sleswig-Holstein" rebel army quickly rearmed them self with percussion muskets (and rifle-muskets).
But in comparison to the US army, The rebels had the German arms producing areas just a couple of hundred km to the south with good railroads connections.
And the danish government forces had about 200km in direct line across the sea to Copenhagen.
And easy access to to imports from other states by sea. (and complete control of the sea)
So I think staying with flintlocks was a smart decision for the US army in mexico
And making the change was the right thing to do for both sides in the 1st Slesvig war.