Question: where does the phrase train of thought come from?
Answer: Thomas Hobbes in his Leviathan

The term "train of thoughts" was introduced and elaborated as early as in 1651 by Thomas Hobbes in his Leviathan, though with a somewhat different meaning (similar to the meaning used by the British associationists):