The relevant sections are as follows:
NH RSA 627:4 Physical Force in Defense of a Person.
II. A person is justified in using deadly force upon another person when he reasonably believes that such other person:
(a) Is about to use unlawful, deadly force against the actor or a third person;
(b) Is likely to use any unlawful force against a person present while committing or attempting to commit a burglary;
(c) Is committing or about to commit kidnapping or a forcible sex offense; or
(d) Is likely to use any unlawful force in the commission of a felony against the actor within such actor's dwelling or its curtilage.
II-a. A person who responds to a threat which would be considered by a reasonable person as likely to cause serious bodily injury or death to the person or to another by displaying a firearm or other means of self-defense with the intent to warn away the person making the threat shall not have committed a criminal act.
III. A person is not justified in using deadly force on another to defend himself or herself or a third person from deadly force by the other if he or she knows that he or she and the third person can, with complete safety:
(a) Retreat from the encounter, except that he or she is not required to retreat if he or she is within his or her dwelling, its curtilage, or anywhere he or she has a right to be, and was not the initial aggressor; or
631:3 Reckless Conduct.
V. The act of displaying a firearm shall not, in and of itself and without additional circumstances, constitute reckless conduct under this section.
627:1-a Civil Immunity.
A person who uses force in self-protection or in the protection of other persons pursuant to RSA 627:4, in the protection of premises and property pursuant to RSA 627:7 and 627:8, in law enforcement pursuant to RSA 627:5, or in the care or welfare of a minor pursuant to RSA 627:6, is justified in using such force and shall be immune from civil liability for personal injuries sustained by a perpetrator which were caused by the acts or omissions of the person as a result of the use of force. In a civil action initiated by or on behalf of a perpetrator against the person, the court shall award the person reasonable attorney's fees, and costs, including but not limited to, expert witness fees, court costs, and compensation for loss of income.
The italicized text in RSA 627 is relatively new compared with the original section, and added as a push toward a stand-your-ground state, which is why the wording is "wonky". The remainder of the section was fairly coherent prior to inserting the stand-your-ground clause. The clause effectively negates the duty to retreat unless you are somewhere you are NOT authorized to be. This would presumably be while committing a trespass, but (as far as I am aware) the courts have not ruled on that issue.
Assuming you are not law enforcement or have some fiduciary responsibility to the gas station attendant, and
The original poster appears to assume that he is alone. Things can get complicated very fast if you are with your spouse, children, or a friend.
Number 1:
The ideal response if it can be done safely. However, be aware that if you suddenly start sprinting toward the door you may startle the perpetrator (with unpredictable results), and you probably will need to turn your back on them. These may not be acceptable options. Running for the door with a child may not be feasible. "Smoothly sliding out" of the situation would be a great option, if possible.
Number 2:
Legal but tactically foolish. If you are going to warn the perpetrator (with the attempt to end the incident non-violently), it is a poor tactical decision to wait to draw until he turns on you. You are now playing catch-up in a lethal force encounter, to your own detriment.
Number 3:
Also legal and, while tactically better, still foolish. You can still be shot. People don't die instantly from gunshots (unless you hit the central nervous system). The perpetrator will have a few seconds of time to get off several shots in your direction before bleeding to death, even with a shot directly through the heart.
Number 4:
Also legal, as long as the perpetrator represents an imminent, lethal or non-lethal force (627:4 II b) threat to the auto shop employee. Tactically this is the safest ENGAGEMENT option (although not engaging is better, if it can be done safely -- you never lose the gunfight you don't have). NH law allows you to exercise your right of "self" defense in defense of others. However, staying out of prison will require you to clearly show that the employee was in imminent danger. Plus, your jury will be made up of carpenters, school teachers, accountants, etc. who may feel badly about the "poor robber" not getting a "fair warning." While this should not enter their legal decision making, it could. It's a jury of "your peers", not a jury of self-defense experts.
Number 5 (from user6726):
It's fully legal to just sit there and watch. You are under no obligation to intervene (unless you are law enforcement or have a fiduciary obligation). Be a good witness. Take mental notes about the perpetrator's appearance, etc. This is a safe option both legally and tactically, EXCEPT THAT there is no guarantee as to the perpetrator's future behavior, which is the key risk in this scenario. Be ready to engage if the perpetrator chooses to engage you. Maybe he doesn't want any witnesses. Advance your weapon to the most ready state that remains out of sight, ideally in your hand with safeties off. It is fully legal to do so, even if the perpetrator never engages you.
IMPORTANT NOTE:
As per NHRSA 627:1-a you have civil immunity against the PERPETRATOR, but not against bystanders. If you are reckless in your choice of self defense method and hit a bystander, you are potentially liable civilly (lawsuit).
Overall, my personal preference (if feasible) would be (in order): 1, 5, 4. Options 2 & 3 are not acceptable to me.