The only person in the Potterverse wielding Deus ex machina is Dumbledore. He constantly pulls out spells/knowledge to solve problems the characters have been working on the entire book. That's his thing. That's why she kills him off before the fight with Voldemort.