I'd disagree that setting S4 in the trenches was "a major risk". Parodying WW1 was well established in Brit culture; the series itself draws on Oh! What A Lovely War and a whole range of comedic tropes associated with the conflict. They were working from a well-established template.