As it was taught in a baraita: With regard to a hole in a wall located between the residences of a Jew and a gentile, one searches in the hole as far as his hand reaches, and the rest he renders null and void in his heart. Pelimu said: One does not search the entire hole at all, due to the danger involved. The Gemara asks: Due to what danger? If we say it is due to the danger of sorcery, i.e., the gentile will suspect the Jew of casting spells on him and will come to hate him and threaten him, if so, when he made use of the hole in the first place, how did he make use of it without arousing the enmity of his gentile neighbor? If the hole is never used there is no need to search it in any case. The Gemara answers: There, when he made use of the hole, it was during the day and there was light, and the gentile would not raise the suspicion that the Jew was casting spells in his mind. Here, it is during the night and the search is performed with a lamp, and the gentile would raise the suspicion that the Jew was casting spells in his mind. The Gemara raises a difficulty: But didn’t Rabbi Elazar say that those on the path to perform a mitzva are not susceptible to harm throughout the process of performing the mitzva? The Gemara responds: In a place where danger is commonplace it is different, as one should not rely on a miracle, as it is stated with regard to God’s command to Samuel to anoint David as king in place of Saul: “And Samuel said: How will I go, and Saul will hear and kill me; and God said: Take in your hand a calf and say: I have come to offer a sacrifice to God” (I Samuel 16:2). Even when God Himself issued the command, there is concern with regard to commonplace dangers.
דְּתַנְיָא: חוֹר שֶׁבֵּין יְהוּדִי לְאַרְמַאי — בּוֹדֵק עַד מְקוֹם שֶׁיָּדוֹ מַגַּעַת, וְהַשְּׁאָר מְבַטְּלוֹ בְּלִבּוֹ. פְּלֵימוֹ אָמַר: כׇּל עַצְמוֹ אֵינוֹ בּוֹדֵק מִפְּנֵי הַסַּכָּנָה. מַאי סַכָּנָה, אִי נֵימָא סַכָּנַת כְּשָׁפִים, כִּי אִישְׁתַּמַּישׁ הֵיכִי אִישְׁתַּמַּישׁ? הָתָם כִּי אִישְׁתַּמַּישׁ — יְמָמָא וּנְהוֹרָא, וְלָא מַסִּיק אַדַּעְתֵּיהּ. הָכָא — לֵילְיָא וּשְׁרָגָא הוּא, וּמַסֵּיק אַדַּעְתֵּיהּ. הָאָמַר רַבִּי אֶלְעָזָר: שְׁלוּחֵי מִצְוָה אֵינָן נִיזּוֹקִין! הֵיכָא דִּשְׁכִיחַ הֶיזֵּיקָא שָׁאנֵי. שֶׁנֶּאֱמַר: ״וַיֹּאמֶר שְׁמוּאֵל אֵיךְ אֵלֵךְ וְשָׁמַע שָׁאוּל וַהֲרָגָנִי וַיֹּאמֶר ה׳ עֶגְלַת בָּקָר תִּקַּח בְּיָדֶךָ וְגוֹ׳״.
We might wonder, what is the reason that when there is commonplace danger there being involved in a mitzvah does not offer protection from dangers, as opposed to less commonplace? One answer might be that since it is a common danger it is closer to a revealed miracle, which is understood to require unusually strong merit (see for example Taanis 8b, Chochmas Shlomo Kiddushin 29b). However, we can offer a different answer based on a chakira analysis from the Sedei Chemed ( Rav Avrohom Tzvi Margolis quotes Sedei Chemed part 5, pg. 371 but I cannot find it. https://asif.co.il/download/kitvey-et/krmial%20/tvot%204/1%20(2)(2).pdf ):
Do we say that those on the path to perform a mitzva are not susceptible to harm because Hashem prevents the harmful act from occurring, or do we say that the harmful act occurs BUT the person is miraculously saved? By example, if while the person was searching for chametz, there was destined to be a random snake in the wall, did the snake providentially slither away BEFORE the person started to search, or was the snake miraculously held back from biting?
If you say the former instead of the latter, it is easier to understand why when danger is commonplace, we cannot say sheluchei mitzvah eynan nizokin. This is because the status of involvement in a mitzvah can preempt a danger so that it is not there, but it cannot neutralize a danger. Thus, in a situation where danger is commonplace, the commonplace cannot be preempted and removed. Or using our snake scenario, one snake can be miraculously redirected to leave the hole, but a den of vipers is going to stay.
for Video Shiur click here to listen: Psychology of the DAF Pesachim 8