I was going to vote no but before I voted I realized I had to look up the meaning of Dues Ex Machina since I didn't know it. After I read the definition below, especially the bold, italicized, underlined parts, I voted yes. If you read just the bold, italicized, underlined parts, they describe the ending to a T.
Deus Ex Machina definition according to Google: An unexpected power or event saving a hopeless situation
, esp. as a plot device
in a play or novel.
Personally, I think the end of the definition should read: in a play, a novel, a movie or a tv show.