I disagree. Once people stopped wandering and started settlements the tendency for xenophobic violence had to end because it was no longer possible to know every person in a settlement. It had nothing to do with spirituality and everything to do with expediency
There weren't any settlements. There were only tribes. The tribes were mostly family. You're jumping
way ahead to a settlement... that's post-civilization. There is no evidence of any civilization existing without spirituality.
Now, neither of us knows for certain, the answer is elusive. But it's my theory that human spirituality must've preceded civilization or we would've found remnants of ancient civilizations devoid of spiritualism. And I can conjecture how this spiritual connection was something early man could use in forming trust relationships with others. Tribes suddenly grew into civilizations.