Dig-one-s-own-grave Definition

verb

(idiomatic) To behave in a way that is likely to have future negative effects on oneself.

Wiktionary