If 99% of males died, then what would Catholicism do for priests?
It seems simply to me the the Church would learn to adopt somehow to the situation. Your scenario almost has a end of times connotations to it; in which case the imminent end of the world be very soon. Scriptures tell that Holy Spirit will direct the Church until the end of times. But on the other hand, Scriptures do not tell us if the Church will be without a pope, bishops or priests.
All this said there could possibly some historical examples that may shed some light on this question.
It could be possible that a bishop or two would consecrate other bishops and ordain priests, even if married in order to preserve the Catholic faith and continue to administer the sacraments to the faithful. Priests and bishops at one time in history were permitted to be married. St. Peter, the first pope and a bishop was himself a married man.
At temporary solution would be to ordain those men to the priesthood in order to pass on the faith.
Historically some bishops ordained married men in the Latin Rite in order to preserve the faith in communist countries. As the communistic power waned, Rome ordered that these men serve the Church as married deacons.
The Vatican has revoked the status of about 300 underground priests in Czechoslovakia who were secretly ordained to keep the Roman Catholic faith alive during the decades of Communist rule.
Men who served as clandestine priests have been told to report to their local bishops before Sunday, which is Palm Sunday. Those who are not married have been told they can apply for formal ordination, which will involve tests of their knowledge of church teachings and liturgy and possibly additional training.
Underground priests who are married have been told that they must give up performing duties of the Roman Catholic priesthood, but may work as deacons, assisting other priests or teaching. Or they may apply for ordination in the Greek Catholic, or Uniate Church, which is strongest in eastern Slovakia and allows married priests. Final Ruling by Vatican
The ruling was delivered by the Vatican's Congregation for the Doctrine of the Faith, the former Holy Office and the Roman Catholic Church's final arbiter on questions of doctrine. - Vatican Rejects Secret Priests Ordained in Czechoslovakia
Although this may be one possible solution. My favourite possible historical example to demonstrate that the Church will somehow find a way to continue is as follows.
For example, what would happen to the Catholic Church if all of the bishops and priests get wiped out in a particular country?
The Catholic faith could possibly be preserved in one of several ways, like these for example:
That last scenario is not without precedence. It has happened before. The faithful of Japan survived in great numbers for some 250 years without any Catholic priests or missionaries. That is not a little thing!
In 1614, all Catholic missionaries were expelled from Japanese soil. Fr. B. Petitjean arrived in Nagasaki, Japan in August 1864 and was able to construct a small Church. On March 17, 1865 he discovered that the Christian faith had survived in Japan for some 250 years without any missionaries (priests) to administer the sacraments!
Japan was forced to open to foreign interaction by Matthew Perry in 1853. It became possible for foreigners to live in Japan with the Harris Treaty in 1858. Many Christian clergymen were sent from Catholic, Protestant and Orthodox Churches, though proselytizing was still banned. In 1865, some of the Japanese who lived in Urakami village near Nagasaki visited the new Ōura Church which had been built by the Paris Foreign Missions Society (Missions étrangères de Paris) barely a month before. A female member of the group spoke to a French priest, Bernard Thadee Petitjean, and confessed that their families had kept the Kirishitan faith. Those Kirishitan wanted to see the statue of St. Mary with their own eyes, and to confirm that the priest was single and truly came from the pope in Rome. After this interview, many Kirishitan thronged toward Petitjean. He investigated their underground organizations and discovered that they had kept the rite of baptism and the liturgical years without European priests for nearly 250 years. Petitjean’s report surprised the Christian world; Pope Pius IX called it a miracle. - Kirishitan (Wikipedia)
In Japan this is liturgically celebrated as the Finding of the Japanese Christians. Sorry, St Patrick's Day is not a big thing on this day in Japan!