I wish those that have credited Tolstoy for this would correct their excellent and meaningful stories to credit Socrates. The Maverick Files’ story 5 Quotes By Leo Tolstoy to Hep Lead a More Content Life and Living Outside of All the Boxes by Katrina Bos are two stories in which I have recently noted this attribution and commented therein that Socrates is the first human recorded to have imparted this wisdom.
Giving Tolstoy benefit of the doubt that he did not read Plato and intentionally plagiarize Socrates (in Socrates’ time I understand that knowledge was transmitted orally and that we know of Socrates' wisdom from Plato's writings) and mistook his archetypal knowledge (see Rebecca Romanelli’s masterpiece on the topic), for original thought. Rebecca writes of Carl Jung:
He suggested they were forms of innate human knowledge passed down through our ancestors.
Archetypes stemmed from the collective or universal unconscious.