teething or habit??

My LO is almost 20 weeks old and he's been drooling a lot more for a while now he also like to shove his hand in his mouth..not just a finger or two but he puts his whole fist in there..sometimes he'll start gagging cause he won't take his hand out of his mouth.. I take his hand out for him when that happens. He's always sucked on his hand though.. even right after he was born he was sucking on hand lol 
So is he doing this because he's teething? Or is it just a habit? How can I get him to not overdo it to where he's gagging? I try to take his hand out but he just puts it back in.. he's not hungry..and sometimes he does it more when he's trying to sleep..he'll remove his pacifier and replace it with his hand 😩😩😩