I thought this would be a lot better than using cotton, but after trying this with a few different species of ants, I found there is a little problem. Some ants will just chew up anything they can get the tips of their mandibles in.
If you're wondering, this was the work of one Crematogaster queen. I had quite a few Camponotus nanitics escape the same way. It just doesn't work.