In a dark way, this joke sort of works. While the phrase 'shotgun wedding' does indeed imply 'wife or death' as the joke puts it, it usually means something very different: a wedding that happens between two people already expecting a baby.
Shotgun wedding : A case of wife or death .