The terrarium should allow flow of oxygen without allowing the insects to escape. It should also be big enough to house a small amount of food and/or leaves.
Buy a plastic box of a proper size with a cover and make some small holes in two areas to to allow for the air flow (such a holes may be done using hot nail of a proper size).
I use these cages to transport cereal aphids on small wheat seedlings, but you should be able to modify them to take other plant material.
Take a plastic pill bottle (I use the "100 pills" size) and cut the flip lid loose from the pill bottle. Plant the seed of the carrier plant in the bottle, right in the middle. Make a hole in the lid that the plant(s) can grow through. Be very careful watering because the bottle does not have drainage and you don't want the soil too wet or too dry. When the plant has grown through the hole,carefully lift the lid and cover the soil surrounding the plant with paper towel or cotton wool (to stop the soil moving during transport). Cut a thin piece of foam that will fit onto the bottle, make a hole in it for the plant to fit through. Use a clear plastic bottle that has the same diameter as the pill bottle to make an insect proof cage, ventilation holes can be melted into the plastic with a soldering iron and then covered with gauze of the right size to contain the insects (stick gauze with silicon to the bottle). Place the insects on the plant, put the bottle cage on and hold it in place with multiple rubber bands.
Thank you very much for your answer. If I decide to use this method, I may just use the plastic bottle with a thin layer of soil instead of growing the actual plant, as the terrarium only needs to hold the insects for a period of a few hours to a week, and the intended insects should be able to survive in such a cage, particularly with a good supply of detritus for food.