I could of course be wrong, but I’m not aware of it being done before or since. What was it about this particular war that seemed ideal for trench warfare, and what were the strategic goals for fighting in this way?
In addition to what has already been said, I think this answer by a since-deleted user does a good job of discussing your question, and if you are interested in how trench warfare became less relevant, I would recommend this response, also sadly by a deleted user.