No you should never punish your child with diapers. That can actually be classed as sexual abuse too.
Diapers should never be used as a punishment tool.
A good spanking may be needed but you should never use diapers as punishment.
If he actually needs diapers to control a wetting problem then that's fine but not for punishment.