Definitely malleable
You say...
According to what I perceive, the moral compass is static, defined by religion.
This is trivially provable as false, by counter-example.
From Christianity and Judaism, you have plenty of moral laws in for instance Leviticus that are clearly not compatible with modern justice.
- Stoning for adultery
- A ban on tattoos
- Stoning your children if they are disrespectful
- Condoning slavery and perpetual indentured servitude
- Persecution and extermination of entire tribes/peoples... i.e. genocide/ethnic cleansing.
You had the Church of Jesus Christ of Latter-day Saints that were blatantly racist. This stance was later rescinded in the 1950s.
You have the Catholic church that repeatedly have backpedaled on moral issues. One of the most damning ones perhaps being to collectively condemn the Jewish people for the crime of deicide; for killing Christ. This was rescinded in 1964.
Several religions have considered holy war — to spread the faith by conquest — to be morally justifiable. This has now changed and is not considered a justifiable position, at least among the more established and authoritative factions.
Judaism considered circumcision by mohel to be the way to embrace an infant into the covenant. When it became obvious that the procedure — cutting the foreskin and then having the mohel use his mouth to suck at the infant's penis and remove the foreskin that way — was both utterly distasteful and also dangerous to the infant, the practice was abandoned.
There are many more examples of this. I can wholly recommend Christopher Hitchens's book "God Is Not Great" for more.
Hence your premise that religion presents a static moral foundation is wrong. First the religions differ among them; most being mutually exclusive on some points. And then religions change their stances when forced to it by humanistic values gaining traction among the populace.