Gorgon Heap, sure enough I skipped over th details of the machinegun, and only went after the OP. I study history for pleasure, and at some points in my life, it was actually applicable to my career (navy).
Actually, Trench warfare existed very far back, with the beginings of it likely predating the Roman Empire. Trench warfare is siege warfare. The means of killing change, and the size of the armies and the reach of the weapons likewise, but anytime you had two forces that really wanted a piece of ground, if one could get there first to fortify and garrison it, you’d have to go to a siege to ry them out, and that involved essentially building a fort around the fort, partly facing in to hold the defenders in place, and partly facing out, to prevent relief efforts.
On reasonably open ground, or when there was nothing worth sacrificing you mobility for, armies would face off and try to beat the hell out of each other in a slugging match. When that happens, communication and mobilty are key. The calvary supplied both, as well as being elite shock troops. The last really war where horse calvary could be decisive was probably the American Civil War, and even then, the calvary had turned into mounted riflemen, rather than saber-charging gallants. By the time of WWI, many European armies had failed to learn this, mostly discounting the ACW as an unseemly brawl between half-trained militia. While that was to some degree true, they missed the important lessons, like the folly of charging bayonets into prepared infantry. Come 1914, the French and English tried just exactly that, and not only were the German riflemen more than sufficient to break the charge, the Germans had stocked-up on the “toys” that England and France had disdained: Machineguns. Modern bolt-action rifles combined with machinegun fire pretty much put paid to mobility based upon the tactics of a half a century gone. It wasn’t lack of communication that created the siege across Europe, it was outdated tactics come face-to-face with modern modern technology, combined with a really arrogant and narrow-minded military leadership (especially on the parts of the English and French).
The Germans had somewhat better high command, but not by much, and the Americans were so arrogant that they had to relearn in 1917 all the lessons of 1914.
Now, had someone tried a war of mobility early on, with mechanical mounts, armed with machine guns, and armored against machinegun fire, the calvary could’ve reigned supreme once more…