The Ensign wasp – which is black in colour, is distinctly known for its tapping/jerking tail which is really its metasoma.
This kind of wasp do not sting humans, they feed mainly on the nectar of flowers or honey dew and live for approximately two weeks. It is the larvae of the Ensign wasp that feed on cockroaches.
During its short adult lifespan, the female Ensign wasp finds a cockroach egg-case into which she inserts a single white egg. Once hatched, the larva develops inside the cockroach’s egg-case and devours all the roach’s eggs. At maturity the adult Ensign wasp escapes through a small round jagged hole it cuts in the egg-case.
I read that we could control at least 50% of the population of cockroaches if there was a mass release of these wasps, but I guess as humans, we prefer using insecticides.