The literary term "deus ex machina" doesn't refer to divine intervention per se, not these days anyway. It generally means a resolution that comes out of the blue, that doesn't arise logically out of anything previously established in the story and thus feels random and arbitrary.
I don't think that really applies here, since the Prophets and their great power had been well established over the course of the series. It was just a question of convincing them to get involved. If they'd just chosen arbitrarily to change their policies and intervene, if they'd just swooped down out of nowhere without any setup or justification, that would be a deus ex machina. But they only got involved because Sisko, the star of the series, stood up to them and convinced them to get involved. So it was the hero's actions that were ultimately responsible for resolving the crisis. That's what keeps it from being a deus ex machina ending.