I agree, this isn't on purpose. I went through this with both boys and to a certain amount with my second daughter. The boys were definitely worse, especially difficult child 3.
I do think that it is connected to Sensory Integration Disorder (SID) in some form. They're just not aware of it. The problem is, besides dirty underwear (which does wash out), their skin in that area is going to get red and inflamed.
What worked for us - I used my nose. I also used observation - if I saw that the child had been to the loo for a 'longer visit', I made a point of checking, and helping him clean up. A really bad job - into the shower with the hand-held shower to hose them down (a hand-held shower is fabulous for cleaning up muddy kids, too, or after the beach).
We also keep a packet of baby wipes in the loo, for ANYONE to use. You can get flushable ones these days too, but we tend to not flush them, we have a special bin for them. We showed the boys to wash off with a cloth, as a routine, after a long sit-down session. For a while I would check to make sure.
There was still a problem with school toilet use and I would get phone calls from teachers asking me to come and clean up my child, but most of the time the boys would prefer to wait until they got home. In difficult child 1's case, he had to be reminded to go - a week would pass and he would have forgotten to go, and as a result would have problems, including clean-up problems.
It does improve.
The other problem - the sore rear end from being soiled for too long - we use coconut oil. Olive oil or cooking oil will also do. it makes it easier to clean up next time, too. It keeps the area protected from moisture. If you want to use an antiseptic keep it gentle, but we use ti-tree oil sparingly. Frankly, all they need is to be cleaned and greased, that the skin will heal itself.
Good luck!
Speak softly and carry an economy size pack of baby wipes!
Marg