1. Lift the lid and/or seat of an ordinary toilet. Typically, the toilet bowl is somewhat oval in shape; the upper "edge" of the bowl is maybe 5cm wide, and fairly flat.
2. Place a somewhat special mostly flat plastic oval/ring on that exposed ceramic surface. It extends toward the center of the
bowl by only a centimeter or two at the most. The underside of this flat ring therefore contacts the upper edge of the bowl all the way around the bowl. This part of the plastic ring needs to be a high-friction substance, so that it stays in place. The part that extends from the edge of the bowl inward, however, needs to be very-low-friction, like Teflon. We also want this part to "droop" a bit. Finally, the interior edge of this plastic ring needs to have a sharp-ish edge.
3. Construct a kind of ramp at the rear of the toilet. We want to make it easy for bugs on the floor to crawl up onto the top of the toilet bowl. It might be wise to construct this ramp so it can be raised like a drawbridge.
4. Obtain a spray-can of appropriate pheromones. For any bugs you want to attract (cockroaches, spiders, etc), the appropriate pheromones would be in that can. (Since such cans don't currently exist but are quite technically possible, that's why this Idea is Half-Baked.)
(Interjection: the word "bugs" is not required to be synonymous with "insects". This is fortunate because spiders are not insects--more than 6 legs they have--but we can still call them "bugs".)
5. Spray around the inside of the toilet bowl, where the ceramic is dry. It shouldn't be necessary to use much, bug pheromones are quite powerful in terms of being detected by bugs in low concentrations.
6. Wait. Do something else for a while. The pheromones will pervade the area and attract bugs. Eventually they will find the ramp and soon after go toilet-diving. Involuntarily, thanks to the sloping slippery part of the special plastic ring. The sharp edge practically eliminates any possibility of a bug avoiding a toilet-dive. If they don't drown and start swimming toward the interior sides of the toilet bowl, and if they can climb the smooth ceramic, they still won't be able to get out, thanks to the slippery underside of the part of the plastic ring that circles the bowl.
7. Come back every so often, decide when enough bugs have been lured, and flush. If you need to use the toilet for its normal purpose, raise the drawbridge/ramp first. Note that the flushing will probably wash the pheromones away; so a little while afterward, when the ceramic above the water level has dried, use the sprayer again.