Old English þoht, geþoht "process of thinking, a thought; compassion," from stem of þencan "to conceive of in the mind, consider" (see think). Cognate with the second element in German Gedächtnis "memory," Andacht "attention, devotion," Bedacht "consideration, deliberation."
Bammesberger ("English Etymology") explains that in Germanic -kt- generally shifted to -ht-, and a nasal before -ht- was lost. Proto-Germanic *thankija- added a suffix -t in the past tense. By the first pattern the Germanic form was *thanht-, by the second the Old English was þoht.
Second thought "later consideration" is recorded from 1640s. Thought-crime is from "Nineteen Eighty-Four" (1949); thought police is attested from 1945, originally in reference to war-time Japanese Special Higher Police (Tokubetsu Koto Keisatsu).