The text is a proverbial expression meaning that just because something is at risk does not mean it will definitely be lost or come to harm. It does not play on the different meanings of a word or similar-sounding words for a humorous or rhetorical effect.
All is not lost that is in danger .