It was literally threatening to destroy the citrus industry. Insecticides were failing to control it. Entomologists were sent to Australia where the Vedalia beetle was found and brought back to California. It controlled the scale completely and the scale has not been a problem since. Cardiac glycosides are powerful emetic causes birds who eat those insectsto vomit.
Birds learn to discriminate after one exposure.
Some edible, nontoxic insects take advantage of aposematic coloration in other species, and mimic a toxic insect. The mimics may look exactly like it as in the case of the monarch and the vicroy butterfly which as adults are difficult to distinguish. Syphid flies mimic wasps. Spines can be laced with a toxin. Some moths look like rotting leaves with fungus spots and the general color of a dead leaf.