The reason arguments are dangerous is that while they look like an attempt to correct someone's knowledge, in reality they easily mix with the desire to place yourself in the 'teacher's seat.'
However, Confucianism places great value on teaching, and at first glance this might seem contradictory to Mencius's words. But it explains that the purpose of teaching is different. Good teaching aims to bring out the best in others and nurture them, and it should come after self-cultivation. On top of that, it requires the other person's consent, such as when they are in need. Bad teaching, on the other hand, is about self-display, the desire to feel superior, and interfering without being asked.
In reality, it's hard to draw a perfect line between the two, but I think the effort is to keep trying.
I would also make a distinction between kids’ ‘teaching’ behaviors you describe and the one in Mencius’s quote