Dangerous stunt. Questionable strategy. Dangerous thoughts or actions. Early on children are taught to be wary of fire t hat can hurt them or cause devastation, so this phrase emphasizes that’s one’s intentions, words or endeavors may conspire to produce an unpredictable and disastrous outcome. (Compare to Flirting with disaster, Open a can of worms or Leave it be.)
“I warned him that he is playing with fire, because you can not join a white supremacist group and than quit, they will come after you.”