Can you provide the source of this narration?
إن الله ليصلح بصلاح العبد ولده وولد ولده وأهل دويرته وأهل الدويرات حوله فما يزالون في حفظ من الله ما دام بينهم
Imams Nasai and Abu Bakr ibn Abi Shaybah (rahimahumallah) have recorded this narration as the statement of Muhammad ibnul Munkadir (rahimahullah), a Tabi’i.
(As Sunanul Kubra: 11866, Musannaf Ibn Abi Shaybah: 36564)
Through the piety of a person, Allah rectifies his children, his grandchildren, the people living in his home as well as the people living in the neighbouring homes. They all remain under the protection of Allah, as long as this person remains among them.
Also see here
And Allah Ta’ala Knows best.
Answered by: Moulana Suhail Motala
Approved by: Moulana Muhammad Abasoomar