The Haynes decision is an interesting one because it essentially makes the case that the federal registry as it existed then could lead to self incrimination of criminals who owned firearms which they legally unable to own. Thus they couldn't register them without incriminating themselves.
There's a legal argument underpinning this that as a nonlawyer I'm not sure I understand, but I'll try to explain. Basically they held that the gun registration was directed at a "highly selective group inherently suspect of criminal activity" and concerned with "an area permeated with criminal statutes" where registration might form a "link on the chain of evidence" used to convict the registrant of a crime. This was the same argument outlawing registration of communists for example.
Now, I believe there are ways around this such that a federal gun registration program be made constitutional. If you write it so it applies to the general populace, and let's say enacts a tax on all firearms purchased, the registry would act as a regulatory device to ensure compliance to that tax. In the same way that vehicle registration, or even simply filing one's taxes, doesn't fall afoul of the fifth amendment, a gun registry wouldn't either.
Here's a link the PDF which explains this, hopefully better than I did.
https://www.google.com/url?sa=t&source=web&rct=j&url=https://scholarship.law.duke.edu/cgi/viewcontent.cgi?article=2233&context=dlj&ved=2ahUKEwiBmMa9gurjAhUBuZ4KHYkuDx8QFjAPegQIARAB&usg=AOvVaw2EhirpRuM9OKTjhCgf_0dw&cshid=1564949518537