All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Our advice to you is to perform the prayer once and not repeat it. If what you are experiencing are mere doubts and satanic whisperings, then you should disregard them. If you are certain of what you mentioned, then you should know that many jurists held lenient opinions regarding the pronunciation of the letter Dhaad (ض) as Thaa’ (ظ) given the proximity of the two points of articulation and the difficulty of avoiding it (i.e., pronouncing the Dhaad (ض) as Thaa’ (ظ)). This opinion was chosen by Shaykhul-Islaam Ibn Taymiyyah . Moreover, many late Shaafi‘i and Hanafi jurists held lenient opinions regarding the pronunciation of the letters with close points of articulation like Seen (س) and Saad (ص), and Taa’ (ت) and Taa’ (ط), given the difficulty faced by lay Muslims in differentiating between them in pronunciation.
Therefore, you may opt for this opinion to spare yourself any difficulty and ward off hardship. Seeking to pray in a mosque where the Imaam (leading the prayer) does not make mistakes (in the recitation) is better in all cases.
Allah Knows best.