Diapers are known to cause rashes around the anal opening. A UTI seems to be rare possibility in the scenario you are mentioning, but if in doubt get a urine routine tested.
He might be touching his penis due to the irritation caused by accidental touching of wet wipes on the penis.
Next Steps
Avoid diapers when at home. Use rash free ointment if rashes are present.