I don’t disagree with your assessment of our “fundamental, primitive, ego level,” though I would say that every creature is ultimately “wired for survival and advantage.” Any morality arising from our social nature would necessarily come after these baser instincts/drives in the evolutionary story. A moral sense emerges as both biological and social complexity increase in a species.
We should never lose sight of the fact that, typically at least, cooperation is both moral (as typically defined) and self-interested behavior. Even a group cooperating in a fight against another group will exhibit moral behavior toward their own faction. Humans will go a step further and also put considerable cooperative energy into finding plausible (not to be confused with valid) moral justifications for their struggle against the other. Cooperators generally fare better than individual actors in the struggle for survival, making cooperation in social species quite compatible with basic drives like mere survival.
Finally, being “wired for morality” does not guarantee moral beliefs or actions. A house can be wired to deliver electricity, but it doesn’t necessarily follow that the lights will always work or the appliances will inevitably run properly. Burned out bulbs or empty sockets don’t argue against the wiring. They are merely examples of a failure to reach full potential. Of course, the wiring can short circuit as well. If we take burnt out bulbs, broken down appliances, fraying wires, etc., to be analogous with human failings, the cause may be mental illness, cultural variables, or just plain old short-term self-interest overriding our more ethical social impulses. However, at least in the vast majority of individuals, the wiring still remains largely intact.