Quite legal in germany
No law prohibits an adult to ask a child to get in contact with their parents. In fact, at times it might be imperative to do so - for example, if a teacher needs to tell about the misconduct of the pupil, or the neighbor suffered a harm (like a broken flowerpot) from the child's action.
In the first case, the teacher usually already has a number and requiring them to tell their parents to contact the teacher is to make it easier on the kid - if the teacher calls because the kid didn't fess up, the outcome might be more severe.
In the later case, the neighbor might have a legal case they can pursue to have the parents to pay up for the damage caused by the parents not supervising their child. So the request is not only justified, it also is possibly of legal consequence, since the parents (or guardians) have some obligations.
Now here comes the kicker: In Germany, there are laws against insulting. Yes, defamation of character and heavy insults are lesser felonies under §185 StGB in Germany with up to one-year imprisonment, or a real felony if done very public - like on any social media. At least for Adults. Minors above 14 (and technically young adults up to 21) can be prosecuted using the same paragraphs but much less severe punishments, depending on age, while children of less than 14 get an entry into a register (for use if they offend after 14 - their punishment is augmented then) and a stern talking to at best.