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.
Utilizing the available means to prevent the spread of infection does not go against the Islamic Sharee‘ah, nor does it contradict true reliance on Allah, The Exalted. Actually, a Muslim is Islamically required to utilize the available means, as evidenced by the two Ahadeeth you mentioned. The Prophet said: “Run away from the leper as you run away from a lion.” [Al-Bukhari] It was narrated on the authority of ‘Amr ibn Ash-Shareed from his father that there was a leper among the delegation of Thaqeef. The Prophet sent a message to him: “We have accepted your pledge of allegiance; you may go back.” [Muslim]
One of the means to prevent the spread of this pandemic – by the permission of Allah – is observing a safe distance among the praying people standing in the rows during the congregational prayers held at the mosque. There is nothing wrong with this, Allah willing, and it is rather required, being a means to prevent the spread of the pandemic. As readily known, the means to an end takes the same ruling as the end.
In fact, observing distance among the worshipers in congregational prayers is permissible and valid according to the majority of scholars, even if there is no need for such distance, so how about the case when there is a considerable need for it, namely taking the required precautions against the transmission and spread of the infection?
As for the Hadeeth narrated on the authority of ‘Aa’ishah it has nothing to do with utilizing the available means to prevent the spread of the pandemic!
As for the saying of the Prophet : “There is no infection,” it means that an infection cannot affect a person in and of itself but that it rather affects him only by the Decree and Predestination of Allah, The Exalted, and the norm of causality (i.e. the cause-and-effect relations) established by Him.
Allah Knows best.