The story* 17th century. From the forenames John and Thomas. * (penis): Compare dick, peter, willy and johnson.Etymology from Wiktionary, CC BY-SA 4.0.