You're correct! "So there," especially in your example sentence, is often something children say to each other in a playfully rude or stubborn way.
It can come across as rude OR be used more sarcastically or playfully, depending on the context.
For example, in this context, it would sound quite rude:
"I don’t care if you’re upset! I’m not apologising, so there!"
Here, it emphasises a refusal to cooperate and comes across as dismissive or stubborn.
However, it might not seem as rude in a joking or light-hearted context. For instance, if you were playing a trivia game with friends and you had won some points, you might say something like: "I told you my answers were right! So there!" In this case, the tone is playful rather than serious, so it’s understood as a joke.
Having said that, adults don’t use this expression very often. It’s most commonly associated with childish behaviour or humour. As a native speaker and teacher, I can’t remember ever using it seriously in adult conversations. If I were to use it, it would probably be when joking around with a child or mimicking childish defiance for humour.
I hope that helps! If you would like any further help understanding the nuances of idioms, please feel free to get in touch with me :)