That 2nd photo is in fact of a Union mobile block house American Civil War. The unarmoured loco would push it to within range of the Confederate lines (usually under cover of darkness) and retreat leaving the blockhouse in position to open fire (at dawn). Used in the siege of Richmond in the last year of the war. This did have many similarities to WW1 trench warfare.