I don’t think history at all supports the notion, to address just one of your points, that marriage was ever primarily a religious institution. It’s pretty much always, far back into antiquity and across cultures, been a civil arrangement, mostly a contractual one accompanied by legal rights and responsibilities refereed when necessary by government institutions. Witness the two formal types of Roman marriage in the Republic and the intricate legal obligations that bound them up. One has only to look at South Asia or China to see similarly complex legal arrangements.
And while in medieval Europe, the Church did most formal marriage contracting, they did so as part of their temporal authority. Marriage remained no less a formal contractual arrangement. The Church’s involvement faded to mere ritual with during the Enlightenment in most of the West, and there it remains today.
Marriage is a critical civil arrangement with as little religious involvement as couples wish, which increasingly means no religious involvement. Religion has never in human history had any but a tangential relationship to marriage except insofar as religion was acting in the capacity of or on behalf of the State, which itself isn’t something most people are okay with in much of the world.