I can't say either way honestly. It may be detrimental to wear a diaper, and seeking a professional for this sort of thing may be recommended. But for me, whenever I had that weird burning feeling in my pee, where it felt like I was always needing to go, even if I just went, it was good to have something that I could go into without having to go to the bathroom every 5 minutes...
Idk whether what I'm describing is a uti or not. I would only get it for a few hours to half a day at a time, whereas when my gf gets a uti, she would have it indefinitely until she took her antibiotics for a few days. It may affect guys differently. But for me, the comfort of just letting the pee come out without any restrictions, even if it did burn, helped me get over whatever made the burning feeling. Eventually I would get to a regular pee feeling, and all would be well and good...but again, I'm not going to say either way if wearing a diaper is a good thing, simply because I have no idea xD