The polygraph came much earlier. William Marston had the idea in 1915, and a polygraph-testing laboratory in 1920:
He began working on his blood pressure approach to deception in 1915 as a graduate student under the direction of Hugo Munsterberg in the Harvard Psychological Laboratory. According to Marston’s son, it was his mother Elizabeth, Marston’s wife, who suggested to him that “When she got mad or excited, her blood pressure seemed to climb” Although Elizabeth is not listed as Marston’s collaborator in his early work, Lamb, Matte, and others refer directly and indirectly to Elizabeth’s work on her husband’s deception research. She also appears in a picture taken in his polygraph laboratory in the 1920s.
Since the modern idea of a "superhero comic" wouldn't exist until 1932 Wonder Woman was certainly not fully formed as such in his head.
The way I heard the story, from my psychology professor, is that Marston channeled some frustration with the academic and legal establishment's response to his work (as well as his essentialist feminism and uncommon sexual practices) into the creation of Wonder Woman.