Persecution is never instigated spontaneously and for no apparent reason. There is always some public "good" to be achieved by such a course of action. The Church is either "the enemy of the people" (under Communism) or "corrupt" (French Revolution) or some other such crime . The oncoming persecution in the west will be for, amongst other things, "sheltering child molesters".
We did away with it here.....years ago...opting for General Confessions.
So, obviously, the whole Confession thing is man made rules.
By the way, secular law in California protects the Priest-Penitent communication. There would be a question of whether or not the Priest was obligated to report a plan to commit a crime in the future.
A secular law cannot void the seal of confession, since that is not a privilege granted by the State.