Not sure to get your point. Wonders were not always destroyed. Most of the time they were "converted". The best example is Hagia Sophia which became a great mosque after the Ottoman conquest of Constantinople. Another example is Saladin who kept all religious buildings after conquering Jerusalem. In some other areas, rulers were more tolerant regarding other religions such as Spain or Sicily for instance.
However, I don't think it is possible to change the bonus of such building depending on the religion of the settlement owner