You have also countered with the theory that religion may override our 'built-in' moral system at the local social group level resulting in inferior outcomes as the 'built-in' system is presumably optimized for such situations.
I should add that I am not claiming that this can never happen only that it is a non-dominant effect. I remember reading
The Scarlet Letter many years ago. It is an 1850 work of fiction Set in 17th-century Puritan Boston, Massachusetts, during the years 1642 to 1649.
In the story religion is used as a cudgel to punish and torture in a way that is grossly offensive to our inherrent 'built-in' moral system. The book itself was written 200 years after the period in question and can be seen as a repudiation of such religious interperations.
Religions are also subject to competitive pressures. If a religion strays too far from optimum behavior on the local level individuals can and will abandon it for other options. This was the fate of 17th-century Puritanism which is now essentially extinct.
https://en.wikipedia.org/wiki/History_of_the_Puritans_in_North_America#Decline_of_power_and_influenceDecline of power and influence
Puritan oppression, including torture and imprisonment of many leaders of non-Puritan Christian sects, led to the (voluntary or involuntary) "banishment" of many Christian leaders and their followers from the Massachusetts Bay Colony. This impact of Puritanism on many new colonists led or contributed to the founding of new coloniesRhode Island, Pennsylvania, New Jersey, Delaware, New Hampshire, and othersas religious havens that were created for those who wanted to live outside the oppressive reach of the existing theocracy.[3] The power and influence of Puritan leaders in New England declined further after the Salem Witch Trials in Salem, Massachusetts, in the 1690s. The trials ended with a number of innocent people being falsely accused, found guilty, and executed. Most of the magistrates never admitted fault in the matter, though Samuel Sewall, publicly apologized in later life.
Related Religions and Churches
Most colonial Puritan congregations were absorbed into either the National Council of the Congregational Churches of the United States,[4] or the American Unitarian Association.[5] The Congregationalists merged with the General Convention of the Christian Church, and later with the Evangelical and Reformed Church in 1957, forming the United Church of Christ, while the Unitarians consolidated with the Universalist Church of America in 1961 to form the Unitarian Universalist Association.