Uhmmmn some argue it was NOT A ex deus machina as the prophets/Wormhole aliens having powers indistinguishable even to the federation from magic, is a long established part of the setting, and them having a interest in both Bajor, and Sisko in particular, is equally well established, therefore, its not an ex deus machina.
SF debris review , why I dont always agree with him on everything, seems to be spot on, about why people clash on this. "Imagine their was a work of fiction, that is otherwise historicaly accurate, taking place in the crusades, detailing everyday fairly realistic medieval life, but then someone was forced to deal regularly with a charachter who everyone else knows to be a demon, but is implied is just an alien. Well its understandable that this alien or demon or whatever would be seen by some as an annoyance, as his mere presence intrudes on the othwise Historicaly accurate medieval conflicts that are taking place." (not good at paraphrasing I admit)
Point is what happened on DS9 wasnt a Deus ex machina in the accepted usage , people who disliked the result are largely people from my experience, who are athiests, and dislike any praise being directed at faith."
The authors didnt exactly write themselves into a corner, All they'd have hade to have done is let Rom finish 2 seconds earlier and the minefield would still be in place, it wasnt an act of desperation but of deliberate design.