My oldest did this for a while, it’s just a phase some kids go through. We put him in footless zipper pjs, and would put them on backwards so he couldn’t access the zipper.
Not sure if this will help but offer an alternative such as playdough, slime, and sensory bin that he can satisfy his curiosity and sensory input.
Have you tried using a sleep sack? Or you can put the sleep sack on backwards so they can’t access the zipper
My daughter was the same but she was eating it 😳 we’ve been putting her in all zipper onesies to stop it !! And she sort of stopped doing it even when she’s in a regular onesie now. It’s a phase. If she was in a regular onesie we would put her pants on and then button the onesie over the pants to make it harder for her to get into her pants