I have done some research and here is what I have found.
The most popular similar phrase from a meaning point of view that used to be common in English usage (but is not any more) is a Latin phrase: -
"Proximus ardet Ucalegon"
It was popular in the English language from about 1643 (earliest reference I could find in popular usage) and was still popular in 1849. The notion that if you do not help a neighbour who has a house on fire, yours may well be next was also a popular notion as these excerpts from early American sources testify (reference: Early American Proverbs and Proverbial Phrases - here): -
"He that will not help to quench the Fire in his Neighbours House, may
justly fear to lose his own." - Hubbard Indian, 1677.
"It is an old & wise caution that when our Neighbours house is on fire
we ought to take care of our own." - Colden Letters, 1737.
"...a prudent man should lend his assitance to extinguish the flames
which had invaded the house of his next door neighbour, and not coldly
wait until the flame had reached his own." - Lee Letters, 1768.
"Yet when neighbors' houses are afire, our own is always in danger" -
Jefferson Papers, 1791.
In fact the idea became so popular that it is referred to as a "common observation" in the (Lee Letters of 1768) already quoted.
The latin phrase I have mentioned above: -
"proximus ardet Ucalegon" I've managed to track down to Virgil's Aeneid, and the phrase translates literally to "Ucalegon burns next" (according to Virgil's account the house of Ucalegon, burned down when the city was sacked). The word Ucalegon is not in any modern dictionaries, but according to this source is listed in Webster's New International Dictionary (2nd ed., 1954) as follows: -
"Ucalegon … In Trojan legend, one of the ancient counselors who sat
with Priam on the wall. Aeneas speaks of the flames reaching
Ucalegon’s house, next to that of Anchises, before he fled from the
city. Hence, a next-door neighbor, or a neighbor whose house is on
The same source I quoted above references an Essay by Thomas de Quincey which I've located here, and this attests to what is quoted in the reference above: that Quincey does actually refer to the phrase as "rather too trite," indicating it must have been very popular at the time.
So this was certainly a very popular phrase in 1849 when this essay was penned. You might note in the Winthrop Papers of 1643, (already referenced indirectly above) an extension of the phrase, "...proximus ardet" is used to describe the very idea you have related.
If you are looking for a modern day phrase here are a couple I have come up with...
"Preclude your demise, support your neighbour".
"Help your neighbour or suffer the consequences".
"To turn your back on your neighbour is to turn your back on good
"Woe betide he who fails to help his neighbour".
"Help your neighbour, help yourself".
These are my own inventions so hardly in popular usage but in the absence of any more popular 'modern' phrases that come close to conveying this meaning, I thought they might give you some ideas!