I think this requires a bit of amplification.
The word "resident" can have different meanings. At common law, and as most commonly used in present-day statutes, resident means domicile. Everyone starts at birth with one (usually the domicile of the mother), and it remains the same unless and until changed. One can change one's residence by physically moving to a different state with a bona fide present intention to remain in the new state for the indefinite future. As such, there is no such things as "primary residence" and "secondary residence." In the domicile sense, one can have only one residence at any given moment in time.
Now move to the federal Gun Control Act. In part, this statute imposed a limitation on interstate transactions between individuals primarily to close a perceived loophole by which residents (in the domicile sense) could evade the local laws of their state of residence. However, BATFE has formally interpreted "resident" -- for Gun Control Act purposes and none other -- to mean what Kevin NH describes. This practice, unhappily, gave birth to the inaccurate term (and concept) of "dual residency," which in turn has left lots of folks confused.
When residence comes up in situations I'm asked about, I start by asking: "Where do you vote?"
Finally, if you think about it, none of this is necessary to answer the OP's question. He asks whether, as an assumed MA resident who owns an additional abode in NH, he may legally possess in NH firearms banned in MA that will stay in NH and never come to MA. The simple answer is that MA does not, and cannot, enact statutes governing conduct in another state. (The general subject, for anyone idle enough to want to explore it, is called "extraterritoriality.")