Talmud Bavli : Masechet Taanit (Daf 21)

בבסורא הוה דברתא בשבבותיה דרב לא הוות דברתא, סברו מיניה משום זכותיה דרב דנפיש, איתחזי להו בחילמא, רב דנפישא זכותיה טובא הא מילתא זוטרא ליה לרב אלא משום ההוא גברא דשייל מרא וזבילא לקבורה,ו.
רש"י מפרש : ומשום זכותיה דקבורה מדדו בו מדה כנגד מדה
Maseches Taanis 21:
The Gemara relates a story involving a plague: Once there was a plague of pestilence in Sura, but in the neighborhood of Rav, there was no pestilence. The people therefore thought that this was due to Rav’s great piety. However, it was revealed to them in a dream that rather Rav's neighborhood was spared due to the acts of kindness of a certain man, who would lend his hoe [mara] and shovel [zevila] to prepare sites for burial.
From here we learn the great merit of someone who is busy with the mitzva of Kavod Hames (honoring the dead) where an entire community was saved from death - to the extent that this zchus (merit) is so powerful, it can save from plague.