The SCOTUS system is very very very broken and needs more checks and balances. When the highest court in the nation, for which there is no appeal, is pretty much dictated by 9 people that almost always vote along ideological lines and not objective word of law that is a problem and not justice. The fact that most can predict the outcome will be 4-4 with the 1 "middle" person dictating the rulings points to how broken and unjust the SCOTUS system is. Just stack the court with libs/cons (common presidential tactic) and have whatever agenda you want approved of, letter of the law be damned.
Rant aside, I support the ruling.
I too support the ruling, however, to your larger point perhaps what the US needs is something similar to Canada's "Notwithstanding Clause" that was adopted a couple of decades ago with our new Charter of Rights and Freedoms. In order to get provincial approval of the document, the provinces wanted to ensure that appointed justices to our Supreme Court would not be the final arbiters of legislative rule.
As in the US, our Supreme Court justices are appointed by the Prime Minister and go through a screening process but that process is not as difficult as in the US. As a result, there was concern in the provinces that a Supreme Court stacked by political masters at the federal level could override the will of the people in a province or for that matter the will of the people at the federal level. As a result, the Notwithstanding clause allows the federal or provincial government to adopt legislation that is immune from Supreme Court interference. If the Supreme Court rules a piece of legislation unconstitutional, the body that adopted it can pass legislation that basically says "notwithstanding the Supreme Court ruling, the legislation stands and will be enforced".
Under our Constitution, governments at the federal and provincial levels must hold elections at least every five years, so the Notwithstanding clause has a lifespan of five years, allowing a newly formed government to either let the notwithstanding legislation lapse or reinforce it for another five years - the legislature in question can reinforce the clause an unlimited number of times.
It should be noted that this clause does not apply to all parts of the constitution but only to those related to particular rights and freedoms.
In the case related in this thread, as an example, if such a notwithstanding clause was in place, the US Congress and the President could pass and sign legislation that overruled the US Supreme Court decision for a period of time. In so doing, the issue may become an election issue going forward and would be more readily one where the majority of the voting public could express their opinions, not just the 9 justices of the Supreme Court.
In the almost 3 decades this clause has been in place in Canada, it has been rarely used. Not sure how it would be used in the more volatile US political system.