Thanks for writing to health care magic.
I think you kid might have had a fungal or bacterial infection of the area post diarrhea
Your doctor may prescribe antifungal or antibacterial creams for treatment depending on the examination findings.
Keeping the area open to air will help for early treatment. (you are doing so any way)
When ever a child has diarrhea clean the area with tap water by holding the child under the tap. Do not use a cloth etc.
Try to keep the area as dry as possible during the episode.
Do not use excess soap during the episode.
Hope this helps.