What's a popular phrase that means "a warning against doing something"?
I believe the phrase you're thinking of is cautionary tale. From Cambridge Dictionaries:
a story that gives a warning:
Her story is a cautionary tale for women travelling alone.
Your title asks for "a warning against doing something", and in your example a real-life example is held up as the warning, which fits the definition quite well. (The phrase also sounds similar to clarion call, fwiw.)