Any chemicals released in the air/sprayed/misted/or used in the same room (or enters the room) as a insect puts them at high risk for chemical poisoning, and coats surfaces with the chemicals as well. Even a unlit incense stick is something I can't personally even be in the same room/building with, let along a caged insect, then lighting the incense releases even more chemicals.
You may get luckily and not have the mantid drop over dead immediately within minutes, but it will at the very least poison them. Other insect pets and arachnids are even more susceptible to chemicals.