Perhaps the book of Mormon was an out-flowing of some artistic impulse (or some religious-oriented Muse, perhaps).
Or an artistic impulse mixed with an experience which Smith firmly held to be revelation from on high.
It does appear easier to believe that than to believe that Smith could read the subconscious desires of his audience.
I would think that he appealed to the desires of his audience because he shared a lot of their desires. And he had a vivid enough imagination to bring that message to life, for those who were predisposed to hear something like it.