You could remember that the prefix non- signifies “not” through the word nonpoisonous, for just a material that is nonpoisonous is “not” toxic. As an interjection to negate what was said right before or expose it as sarcasm, it is attested by 1900, popularized 1989 by "Wayne's Environment" sketches on https://daltoncjpvb.hamachiwiki.com/692119/papiertaschen_for_dummies