"Shoot yourself in the foot" and "dig ones own grave" are not unchangeable in meaning. Shooting yourslef in the foot is a "saying" or "idiom" used in english to mean "an action you take is going to have an undesirable outcome and cause more hindrance when you were trying to solve/fix or resolve. Such as buying a cow when you dont have money to feed it, I would say "when you bought that cow, you really shot yourself in the foot". Digging your own grave means you are taking an action that is not going help you and is going to make it worse....such as "I was talking to my wife about why I didnt wash the dishes....little did I know I was digging my own grave" because it wasnt helping only making it worse.