Fortifications and trenches are waaay older.
I think the romans were the first to master it.
But I am not sure, if what you describe qualifies as trench warfare.
But I am not sure, if what you describe qualifies as trench warfare.
It's pretty incredible (and often terrible) what humans with hand tools can do when sufficiently organized and motivated.
The basic concept of a trench with something like a wooden barrier proximate goes back to neolithic times. Interestingly most of these sites we've found seem to not be fortifications but rather something ceremonial. It's ambiguous.