Trenches, hand grenades, and the Civil War as the first "modern" conflict
A common belief is that trenches were invented in the Civil War, an innovation ushering in—alongside the hand grenade and machine gun, both deployed in that same war—the beginning of the modern warfare era. This is sort of true and sort of untrue. Implicit in its narrative is the idea that in-retrospect-obvious strategies like, say, digging fortifications to secure your military position, can take centuries to catch on. This is a bit like the Scurvy theory of progress. Spanish sailors discover oranges as a scurvy cure in the late 1400s, but knowledge isn't widespread or institutionalized across Europe until the 1800s.
The history of trenches is a bit like the history of citrus as a scurvy cure—but more in the sense that shifting contextual details made the same cures more or less effective for different expeditions or eras. Trenches go back to Roman times, and were popular in medieval siege warfare, but the value and purpose of trenches has wildly oscillated since then, such that, for much of pre-modernity, they served as a poor choice of tactic. (And such that, now in the present era, they are again an unfavorable strategy.) The changing situation which is brought about by technology—technology both in the literal sense and in the cultural sense, the evolution of ideas—constantly alters the "problem state" of a military conflict, and thus the fitness of any one solution strategy. And in this constant turnover, which we call history (or ecology), inefficiences flounder, as outdated strategies are inappropriately perpetuated in the name of tradition—some merely vestigial (best case), others actively counter-productive. As the cliche goes, a lack of flexibility, or adaptability, is damning in such a time of transition. When a top-down belief cannot be altered by repeated, contradictory, bottom-up data, the belief can be called ideology.
That is, such decision-makers suffer from a lack of (either/both) empiricism and pragmatism. The former is manifests as rigidity, the latter as context-insensitive proceduralism (or "deontology"). And there is always a minefield of such inappropriate, aged-out heuristics, or deontologies, which increase in number as the pace of world-change increases. For each Chesterton's fence—a traditional structure whose purpose we do not understand, but which is loadbearing for our way of life—there is also, I think, a "Pickett's charge." The term is chosen after Robert E. Lee's catastrophic, Napoleonic-style frontal assault in the Battle of Gettysburg. The weapons had changed since Napoleon—the new rifled barrels could shoot further and more accurately, with shorter loading—which changed the calculus of an open charge—charging troops would have to face dozens of successive volleys, instead of one or two. Too many men would be killed, cross miles of open ground against a fortified position, before reaching the Union breastworks in a hope to overcome them. Some view the charge as the high-water mark of the Confederacy—the day their prospects were sunniest, and they decision which lost it all.
Even Grant and Sherman, widely considered the war's best strategists—a distinction earned primarily for their pragmatism, their rejection of traditional ideas as to what kinds of warfare were "proper," manly, or chivalrous—did not think to use trenches in the early years of the conflict. James Rhodes, in his History of the Civil War 1861-1865, writes that "it is remarkable that with an enemy estimated at from 60,000 to 80,000 and, located according to their own guess, not farther than twenty-three miles away, generals as resourceful as Grant and Sherman did not put their soldiers to work with the pick and spade." As a result, their positions were overrun by Johnston's troops, beginning the deadly Battle of Shiloh.
And yet as Sherman would later recount: "At a later period of the war, we could have rendered [the Shiloh] position impregnable in one night." As the conflict continued, and officer decisions—as well as troop behavior—evolved to better fit the territory (that is, to better fit the tested reality of the problem space), the war became more guerilla-like. Sieges lasted months, trench warfare was bitter—and both led to the widespread use, for the first time in American military history, of hand grenades.
It is probably worth pointing out that Robert E. Lee, before he became the darling of the Confederacy, was ridiculed by Richmond newspapers as the "King of Spades" because he'd tasked otherwise unoccupied defensive troops to dig breastworks around Richmond.