I’ve never heard before that not ejaculating could cause prostatitis. Prostatitis is an infection of the prostate, which is totally unrelated to the number of days it has been since you last had an ejaculation (see https://urologyspecialistsnc.com/mens-health-causes-of-prostatitis/)

It’s true that not ejaculating might cause a feeling of pressure inside but after a week or two, the body will usually get rid of the excessive fluids during a wet dream.