The story about the trenches was largely put together by media observers. It's entirely possible that the sources are Israeli and the concept was real.
However, there is also the thing about the Israeli government needing some positive PR after being caught napping on the missiles.
The amount of ordnance Hamas has been able to launch from Gaza, sufficient to overload and overwhelm Iron Dome and cause serious damage and casualties in Israel, has been a huge embarrassment for Bibi, the Mossad and the IDF.
These missiles, most no doubt made in Iran by the godfathers of Hamas, weren't supposed to be getting in. It has been speculated that a primary purpose of the current dust-up on the part of Hamas is to demonstrate to the mullahs that their investment in terror is paying dividends, in keeping the area destabilized. That's certainly working out.