Our native built-in moral code may be helpful for daily decisions within local social groups but there is little reason to think it functional when dealing with those outside our local social groups.
Your error is your continued insistence to lay the limitations of humanity on the doorstep of religion when in actual fact religion is a critical and perhaps primary mechanism for overcoming these limitations.
There is plenty of reason to think that it is functional outside of small groups. Every day I experience interactions with people with whom I do not share an in-group relationship, and yet I don't judge them as unreliable and those people don't judge me unreliable.
Religion does not help overcome these problems when they involve out groups. Religions are, by their nature, inward facing.