>>95997052 (OP)Really depends on what in universe contrivance enabled the dominance of Mechs in the first place. Gundam has those particles that make long range targeting ineffective(but never justified why the fast man operated war machines perform better if they're shaped like humans rather than looking more like aircraft/drones)
Realistically we now know serious mechs would come after aircraft, long range ordnance and drone swarms in any technological progression, so it can't be drone swarms themselves that make them obselete. They have to have an answer to that to have become a thing in the first place.
Personally when I have to try and explain stuff like this I tend towards coming up with some science-fantasy plot device that interferes with with computation and remote means of controlling machines and communication, such that a mech can't just have sophisticated onboard ai and can't just be remote controlled from miles away, and the location of enemy mechs can't be quickly communicated to distant heavy guns. I tend towards explaining the humanoid shape by having them link to the pilots nervous system, making a humanoid shape more intuitive and easy to interface with.
If you want to mirror an agincourt style meta break, maybe people invent very, very basic communications that work at distance, so that literally random infantry down in the mud can send targetting coordinates across long distances again. Like to emphasise how hard normal communications are they can't actually send a video feed or telemetry. They can like type out and send a line of latitude and longitude coordinates before they get stomped into red gruel.