No I would not use diaper punishment on my kid or teen if they were misbehaving.
If you get found out by CPS or the law then you could get into trouble for child abuse especially if you take the diaper punishment too far.
For example if you were to force the child to wear a diaper and then take them out in public wearing just the diaper, shirt and shoes to humiliate them then someone could turn you in and you could get into trouble.
It's never good to humiliate your child and there's other better ways to punish and discipline your child without embarrassing them.
However if the kid or teen is wetting their pants and needs a diaper or pull up then that is okay but it should not be used as punishment.
I'll link to an article about some parents who forced their kid to wear a diaper and the dad even sent the boy to school wearing just a diaper, shirt and shoes.
Later on the dad murdered his son and is being charged with murder.
Now not every parent who diaper punishes their kid murders them or harms them physically but it's still not good to harm them emotionally.
Here's part of the story about the boy being sent to school wearing just a diaper.
-------------------------
It was nearly three months after that initial August report when social services were told that Noah had come to school without pants.
He was wearing only a diaper with a shirt and shoes.
It’s unclear who made the report but it describes Noah’s father as saying, “if he wants to be a baby, I’m sending him to school in a diaper.”
His father also said Noah had a change of shorts in his backpack.
But when Noah went to the school restroom to change his clothes, he came out wearing “red/pink girl’s shorts and a zip-up hoodie with butterflies on it,” the report states.
He told the person who called social services that wearing the clothes made him “sad,” and the school principal went to Target to get him another change of clothes after other children teased him.
-----------------------------------------------------------------------------