You are right: The policy mandated clerical celibacy was put into place during the Middle Ages to combat corruption and nepotism and to make sure Church property was not inherited.
In today’s world, that policy should be revisited. The policy seems to have contributed the pedophilia scandal. There is nothing in the Bible, the Old Testament or the New Testament, or anything in the Gospels or the teachings of Jesus which mandate a celibate priesthood.
In fact in the early Church, popes, bishops, and priests were married, the majority of them were married until the 11th and 12th centuries.
Celibacy, in my opinion, was not a cause of the corruption. It was the corruption of standards, where the practice, which has always existed, came to be tolerated more than previously.