There is no such thing as "double past tense" the grammar in the two questions is completly different.
In the first there is one clause and one verb phrase "did not tell" This is how English forms the negation of a verb
I tell → I do tell → I do not tell.
He tells → He does tell → He does not tell
I told → I did tell → I did not tell
In all cases the infinitive form of the verb "tell" is used with "do". The word "tell" has no tense when used with do support.
In the second example there are two clauses with two finite verbs.
[I knew] (that) [he was ...]
The tense in the second verb can be the same, or it can be different to the tense in the first. There is no rule in English (or any other language of which I am aware that has verb tense) that the tense in every clause must be the same.
I know (now) that he was dating her (but they broke up last week).
I knew (yesterday) that he will go to...(tomorrow)