"the ones under siege will always defeat the ones attacking"
"even if they are defeated and retreating they will just find a new hole to hide in and take a even more stronger position"
"that's what makes trench warfare perpetual"
Yes but also no.
The reason why trench warfare was a pain in the ass was the artillery made the terrain difficult to reinforce the attackers, this made it significantly easier for the defenders to counter attack the attackers, since their artillery and auxiliary units are closer, hence the bloody stalemate. Oddly, if done right it be in the attackers favor as the defenders will suffer more cuaslites than the attackers.
That's right, the correct call in trench warfare is to send your men to the grindhouse because the enemy will have to grind more of their guys as well to keep their stuff, as retarded as that sounds.
Trench warfare is a pure war attrition.
To oversimply it trench warfare is more like a tf2 control point map with instant spawns. For those who never played tf2, normally defending respawn is closer to the objective but take longer to respawn than the attacker for game balance because the devs hate stalemates.