This idea is part of a larger premise so I‘d need to establish a VERY different reality that most of us live in now. Funny enough, your point of people acting out of pure self interest is one part that would go first because these people would not survive the world I‘m imagining.
Federation is part of anarchism and in most interpretations I‘ve heard and read so far, communities would work for their shared benefit so of course you fix your neighbors roof, otherwise they will not help you in the future.