Your understanding is correct. Basically 은 거 should be the past form of 는 거, like 본 거, the thing I saw, and 먹은거, the thing I ate.
But there are a few exceptions for:
1) -이다 meaning To be,
2) -고 싶다 meaning Want to (this is supportive verb)
So, for these two, 은 or ㄴ is not for the past tense, but for the present tense. For example, 학생인 사람 is The person who is a student (Not "was a student"), and like your sentence, 하고 싶은 거 is The thing you want to do (Not "wanted to do")
Then, how do we make the two into the past tense? So we have 던 or 았/었/했 던.
So the the person who "was" a student can be "학생이"던" 사람 or 학생이"었던" 사람. Likewise, The thing you wanted to do can be 하고 싶"던"거 or 하고 싶"었던"거.
던 is originally for recalling the past, when the action of the verb occurred repeatedly in the past and when the action is not happening now for general verbs. But 던 can be used for these two verbs for just general past tense.
Putting 았/었/했 is to emphasize more it was the past.