I don't know if this is the right board for this but to me it seems like an anxiety disorder.
I have a 12 year old nephew who is still in pull ups. I thought it was just a problem with urinating his pants but found out differently last year when he came to visit. 2 months ago they visited us in another state, so we went for 4 hours in a car sightseeing ( so we went for a car ride. He was fine the entire time.
They come home and we were playing a scrabble game in the living room not 15' from the closest restroom and he had to go upstairs and clean himself as he did "#2" in his pants.
When they left after 3 days we changed the sheets in the bed and realized he soiled the bed, the carpet, the bathroom rug, and 10 days later I discovered a plastic bag in the garage with pairs of his soiled underwear "stuffed in a corner"