There are 2 different issues here, a law and it’s purported fairness or constitutionality, which is primarily the topic of the article and the discussion on this thread.
The other issue is the right to freedom of religion for a specific sacrament that has been practiced by Catholics for centuries in almost the exact form as today, including the inviolability of the Seal. That is an individual right guaranteed by Founding Documents, a human right to free exercise of religion, irrespective of statutes.
Tyrants and totalitarian regimes have executed priests for refusing to break the seal of confession.
In those cases, political dissidents were being hunted down by the authorities.
With the hyper-intrusive means used today to monnitor those who disagree with the government, the judge’s remarks may be the setup to revoking the privilege.