According to this article it is not all that hard to get threadworms. From the article:
There are two main ways that you can catch threadworm. The first is by direct contact with an infected person. The second is by coming into contact with an object or surface that has become contaminated through contact with an infected person. This could be anywhere, from a toilet seat, bedding, toys, kitchen bench, clothing, door handles, food or furniture. The eggs can even survive in swimming pools. Contracting threadworm is not something that is connected with a lack of personal hygiene but is an everyday hazard of communal living. Once the eggs lose their stickiness, catching threadworm can be as easy as breathing in the airborne eggs contained in household dust. The eggs can survive in external environments for about two to three weeks. Poor hygiene, however, can contribute to the spread of threadworm once you have contracted it. Threadworm eggs become infective within hour of being laid. The small eggs are quite difficult to see with the naked eye and stick to anything that they come into contact with. Invariably, the infected person’s hands become contaminated with the eggs and they become widely dispersed