I believe that Mg is generally more expensive than Ca in the DD package. I further believe _that_ is the primary reason oils have shifted away from Mg toward Ca over the years (decades?). Even in the '80s, we chose an all-fleet oil with higher Mg levels than the 'typical' oils were using at that time, because we believed it to be a technically superior approach.
It would probably take me a while to track it down, but some time ago I posted a link to a lubrication industry paper that reported that magnesium based detergents had the capability of interfering with the beneficial synergistic effects of ZDDP and MoS2 in motor oil. The fix that was reported for this was the use of a boron based additive, IIRC...the details are fuzzy.
Anyway, I took this to be a possible reason for why calcium based detergents were far more prevalent before the LSPI issue raised its ugly head...using magnesium required some extra care in the oil formulation. Just my own thoughts and quite possibly completely wrong and useless...