Yes, Willson wrote a very enjoyable book about the making of the stage show, But He Doesn't Know the Territory! It was brought back into print a few years ago, and I recommend it for anyone interested.
It did indeed take him many years to lick the story. Though he had extensive background as an instrumentalist, composer/songwriter, and radio personality, he had never written anything for the stage, and it took him a long time to get the libretto (the spoken part of a musical) in shape; eventually he needed a collaborator (Franklin Lacey, who gets co-librettist credit) to make it stageworthy. Example: One of the ideas he passionately wanted to incorporate was understanding and sympathy for the physically afflicted: his idea was that Winthrop had cerebral palsy. He was eventually persuaded that this carried more weight than the show could hold, but it took him a long time to figure out what to do instead. Then someone remarked how effective the anonymous lisping kid who sang one line of "Wells Fargo Wagon" was, and they realized that that was their solution: a speech impediment he was made self-conscious about, in combination with the loss of his father, would make him an introverted sullen kid whom a bandmaster could help.
I was so glad he said that, because it's an essential point, and not everyone gets it (I myself took an embarrassingly long time to notice it). And I think it's one of the essential American folk tales, in much the same way Faust and the star-crossed lovers are European. The con man who, unknown to himself, really can do what he's pretending to do. Another handy example is The Rainmaker, the movie in which Burt Lancaster pretends to be able to bring rain to a parched town, and in the end actually does (and brings new life to the people he meets as well).
Harold Hill prides himself on being a phony band leader. But he arrives in River City, and what does he do? He turns a squabbling school board into a barbershop quartet. He turns some mean-minded town ladies into a dance troupe. He turns a juvenile delinquent "from the wrong side of the tracks" into an enthusiastic drum major. And (see above) he makes a miserable kid delighted with a new cornet. He teaches new dances to all the young people in town. He does practically nothing but bring music to everyone! Because he teaches them that there's music everywhere, if only they tune in to it. It's right there at the start of Marian's big song (which I stupidly once considered a generic ballad): "There were bells... but I never heard them, till there was you." And what a great subject for a musical, which brings music to us in the audience.