First, a quick timeline for Deathly Hallows:
The trio flee Bill and Fleur’s wedding, and go on the run. They break into the Ministry and overhear some refugees in the woods, and Ron leaves the group. (Chapters 9–15)
Harry and Hermione go to Godric’s Hollow, where Harry is attacked by Nagini. (Chapters 16–18)
Ron returns, they recover Gryffindor’s sword, visit Xeno Lovegood, and learn about the Deathly Hallows. (Chapters 19–22)
They get picked up by Snatchers (end of chapter 22), taken to Malfoy Manor (chapter 33), and Harry steals several wands from Draco during their escape (end of 33). This is when Harry first becomes master of the Elder Wand; see a related question for more detail.
They break into Gringotts, steal the sword and the cup, head for Hogsmeade, prepare for the battle of Hogwarts, Harry goes to the Forest, and upon Voldemort’s return to the castle, they have their final duel.
So Nagini and the Snatchers don’t factor into Harry’s mastery of the Elder Wand, because both of these occur before he takes possession of the Elder Wand. As to why Voldemort’s killing curse in the Forest doesn’t give him mastery, I think the answer comes from this line in their final duel:
Harry saw Voldemort’s green jet meet his own spell, saw the Elder Wand fly high, dark against the sunrise, spinning across the enchanted ceiling like the head of Nagini, spinning through the air toward the master it would not kill, who had come to take full possession of it at last.
— Deathly Hallows, chapter 36 (The Flaw in the Plan)
Because the wand couldn’t attack Harry (at least, not fully) in the Forest, Voldemort didn’t really “defeat” him. Had he attacked Harry with any other wand, Voldemort would probably have taken mastery of the Elder Wand.