As a native speaker, I have to say that I would never use the second sentence, "Did you see what they had done to our city?", except to describe a state of the city that has passed. For instance, if someone had painted a wall, I would ask a friend, "Did you see what they have done to our wall?". If that paint was then washed off, the question would be "Did you see what they had done to our wall?" as that state of "painted" has passed.
As for the difference between sentences three and four, I do not see any. It's just as correct to say "Did you see what they have done to our city?" as it is to say "Have you seen what they have done to our city?". However, I would say that if you asked somebody returning from the city, you would say sentence three rather than sentence four, as "Did you see" implies that they could have seen as opposed to "Have you seen" which implies that they may not have had the chance yet.
For instance, if somebody went to a cinema the same day that a new film was showing, I'd ask "Did you see that film?". If we were talking about the film, and I didn't know that they'd been to a cinema, I'd ask "Have you seen that film?".
As for the fifth sentence, you're absolutely on point.
An open question is one that has many possible answers: subject or object questions are examples of this, as the there are multiple possibilities.
A closed question requires a yes or no answer.
Closed questions in the past simple are usually asked using **did*.
Did you break it?
I hadn't thought about it before, but I think that you have identified a pattern, in that we also use did for object questions, presumably so that the object pronoun can be moved to the start of the sentence.
Best Answer
forms a perfect question.
Natives may not opt for
What he said?
because it lacks the auxiliary verb 'did'.To form a perfect question with 'what' here, you need to put a verb (auxiliary).
See there, remove a question mark, and it becomes a sentence
This is the reason of adding an auxiliary verb.
If you are from an Asian country (especially India), it's okay to form a question like that. Asians understand this as a question. But don't practice it if you want to be good at the language. In India, I keep on correcting others whenever I get a chance! :)