It succeeds by forcing opponents to spend millions of dollars in legal fees and years of time to oppose this ban.
And there will be a small number of citizens who actually get arrested and even convicted under this law. A conviction does not really matter anyway as "the process is the punishment".
Som the law gets overturned after several rounds of appeals through layers of State and Federal courts. And then the Democrats reword the law just slightly and pass it again.
There needs to be sanctions against legislators who pass such "laws" and the judges who keep ruling in favor of them.
The Supreme Court will probably step in fast since they hate being ignored.