I think you're missing my point, which is that a lower court does not have the authority to declare law or precedent unconstitutional. The limit of their authority in a matter like this is to structure their ruling to clearly highlight the deficiency such that a higher court and/or the relevant legislature can take action, and that is exactly what this court has done.
You didn't think a judge would cite those particularly odious examples so prominently otherwise, did you?
They
do have authority to declare
law unconstitutional (in fact, nearly any court can). Specifically, what happens is that the defendants are enjoined (legally prohibited) from carrying out the law (the law actually is still a law, just one that everyone is prevented from carrying out/enforcing).
Lower courts are bound by
precedent of higher courts that have them in their jurisdiction (hence if a higher court ruled a law constitutional, the lower courts in its jurisdiction must also rule the same way, regardless of their opinion). But that's not the reason the judge reached this.
This
could be correct in regards to
Bruen, and may not even be overturned.
Bruen is concerned with "When did the founders think you could ban people having guns." And the answer is "When the founders thought those people were dangerous." Even though the founders thought that because they were racist, it still satisfies
Bruen. The supreme court/higher courts may or may not weigh in on whether racist gun control laws are permitted evidence. One argument might be that at the time, the people prevented from having guns was not because of danger, but because they were not considered part of the people (or even people at all).