The story
From put one's foot in one's mouth (“to say something embarrassing or wrong, or to make a mistake in public, or a social blunder, that is embarrassing or offensive”), adopting the structure of a rolling stone gathers no moss and a closed mouth catches no flies.
Etymology from Wiktionary, CC BY-SA 4.0.