Angelina do we agree that it is illegal to put someone in a chastity belt against their will?
In the specific case of an adult doing it to a child, I think that one is going to heavily depend upon jurisdiction. In many parts of the world, including liberal democracies, it is (for example) perfectly legal for adults to restrain children, beat them moderately hard, and even to inflict permanent genital mutilation upon their sons without consent. In some cultures, the right of parents to raise their children the way they see fit is considered more important than the rights of the children: indeed, the state prohibiting certain practices is sometimes seen as religious or ethnic cleansing.
Angelina of course it's legal, it's just almost impossible to do it without committing other crimes 😂
No, Germany is odd there. In most places the act of escaping is itself illegal. It's a weird quirk of the way the German constitution views bodily autonomy that escaping can't be made illegal on its own.