A better solution would be to get government out of the marriage business.
At face value this sounds good, in reality, loads of lawyers and politicians won’t let it happen. The lawyers stand to benefit from court divorce cases, and the political belief that government must provide support to marriages and divorce is the sacred law to a large segment of the population (must pull out those restraining orders, alimony, child support, inheritance, etc., to prove that government is the hero and supports people).
From a standpoint of principle, I do agree, I don’t feel like inviting government into my life and relationships whenever the option is there.