That's not what "government interest" means here though.and, unfortunately,. it means that they consider that the government can infringe if there's a government interest. Since the primary interests of government are self-preservation and self-expansion. There's no thing that, by that standard, the government cannot do.
If the state can establish that a regulation would actually save a lot of lives, that would pass muster as being a legitimate state interest.
Gun regulations that cannot be established as saving a lot of lives on the other hand would be unlikely to pass muster.
So laws against pistol grips or flash suppressors will be out. There is no way that such laws save any lives.
The same also for New Jersey's law against hollow point ammo. And the various laws against .50 caliber guns. Those laws do not plausibly save any lives.
Laws against machine guns though will probably stand. People can make a credible case that machine guns can do a lot of damage in the hands of a bad guy.