In this case, "do" is echoing the original verb without actually using it.
I heard the car alarm go of... or I thought I did.
They see a mysterious floating object in the sky... or they think they do.
Repeating the verb is also an option, though without do/did.
I heard the car alarm go off... or I thought I heard it/the alarm.
They see a mysterious floating object in the sky... or they think they see one/a mysterious floating object.
Everybody knows the story of the Three Little Pigs. Or at least they think they know it/the story.
By using do/did, you avoid having to repeating both the verb and a pronoun or the noun itself.
Your recommended version would likely be understandable but non-standard.