Today's prompt can be viewed literally and figuratively based on the context given. In my own view, it is more fitting for a figurative expression than a literal term, but for the sake of understanding, I'll write on both briefly.
In literal terms, a person can dig his grave before he dies. It can be a way of preparing himself so as not to be disappointed, especially when he has a family that does not care.
While the figurative term states a person that digs his own grave as someone who is doing harm to himself, whether consciously or unconsciously. But it makes sense unconsciously, because no one would do harm to himself consciously. This harm can be in various forms, it is in no way limited to a certain characteristics.
Having said this, the figurative term happens regularly in our everyday life because people implicate themselves in real life without even realizing it. People bury themselves too, without knowing it.
One need to be careful how he works or acts, especially when taking decisions about himself.
You can also participate by clicking here