Hi
I had my DD whose 4 at the Dr yesterday for this exact same thing, Dr did a swab test and said results would be back in a week, also took a urine sample for UTI. My DD has also had this on and off for a long time, will occasionally complain it hurts when she wees and scratches at herself and says its itchy but up until this time never had a discharge so that's what led us to the Dr.
Dr didnt seem to think it was an infection but is testing regardless, she said steer clear of any soaps or bubble baths and also be aware that sometimes they stick things inside them like small toys, beads.. she said you'd be suprised what I've found over the years - and if they do this it can lead to an infection.
My DD is not the best wiper, she sometimes jumps off and forgets and then I'll send her back and often there's drips of wee on the toilet seat... I think this can cause the redness and irritation. If they dont wipe poos properly this can lead to irritation and potentially infections which could lead to a discharge.
They can also get infections from rubbing themselves if their hands are dirty and can cause the area to become red and irritated.