Maybe Joseph accidentally touched Mary and died and that is why he wasn't mentioned after the incident when Jesus was 12. And maybe Jesus wore gloves when he healed people. And maybe Thomas didn't actually touch Jesus, maybe he put his hand in the holes. Maybe the holes were big enough or maybe Thomas had on surgical gloves.
Speculation is so much fun when you don't have to prove it up by scripture.
LOL! That has to be it. Rules is rules.