Anthony Pagden's "Worlds At War."
Pagden spends a lot of time discussing the evolution of Roman law and its modern Western descendants, like British common law.
The Romans learned one lesson early: keep the priests out of the law courts. Law had to be based on observable facts, logic and human reason.
Western law generally evolved from that Roman lesson, with a few setbacks along the way, as you noted. And Pagden notes some of the same in his book.
But sha'ria law never went thru a similar evolution, despite periodic attempts to make the law more secular in some Muslim societies. The source of sha'ria law is the Koran, period.
What I often heard when I lived in Egypt was a wish for a society with all the benefits of modern Western technology, but still based in traditional Islamic law. e.g. I heard more than one well-educated Egyptian hope for a return to the death penalty for adultery. For both parties.
The thing that scares me - that's exactly what Iranians thought they were getting back in 1979. All the benefits of modern Western society, just a little more religious than the Shah. What they got was a govt. of armed Fundamentalist cranks who dragged the society back to the 7th century.
Egypt had some of the same fights as Iran, over women wearing the veil etc., when I was living there from 2005-09. At one point, Egyptian Minister of Culture Farouk Hosni banned all women on TV from wearing the hijab (head covering). That caused a huge uproar.
You might think Hosni was a Good Liberal for rules like that. Until you saw his threat to search Egyptian libraries and burn any books he found written by Jews.
The Middle East...usually a lot more complicated than it looks...