I just bang the fruit fly container once or twice to knock all the flies to the bottom, take the net cloth off the top, turn the container sideways towards upside down, bang it to knock flies into the enclosures, turn it right side up, bang the flies down again to give me an extra couple seconds while i elastic the top back on.
when dusting, I do very similar to SSimsswiSS
babies eat so fast that the flies dont have much chance to get away.
you could also put the flies in the fridge for a minute, to slow them.
For the pinheads, I keep /raise them in a large bucket (too tall/deep for them to jump out of). I put a smaller container onto the bucket. I shake egg crate or whatever over the smaller container until I've got enough pinheads in there, then put a lid on the smaller container. I walk it over to the babies enclosure, hold the container inside the doors, open and shake out the crickets, then slam the doors closed quick quick before any have opportunity to jump out.