How does the setting influence what happens in the story?
That's a very interesting question. I don't believe that the setting influences the events of the story at all. I believe that the setting influenced the specifics of how the events occurred, but I don't think the setting dictated the overall plot.
Fortunato insulted Montresor. Montresor was obviously angered by it. Montresor plotted to kill Fortunato. Montresor carried out his plan and has never been caught.
The above sequence would have happened no matter where or when the story took place. All that might have changed is the mechanism by which Montresor lured Fortunato to his death. Dan Brown's "The Lost Symbol" is a modern novel placed in present times, but it uses the Montresor trust lure twice. The "bad guy" lures the "good guy" to a specific location by tempting him. The first time is when the good guy is asked to give a speech about a topic he is very passionate about. The second time is when a different good guy actually invites the bad guy to her place of business. In both cases, the good guy puts his/her trust completely in the bad guy.
That's exactly what happened in "The Cask of Amontillado." Fortunato misplaced his trust and paid for it with his life. The specific setting simply gave Poe a working mechanism to lure Fortunato. Fortunato is a wine guru. Montresor knows this and happens to have a wine cellar. Montresor tempts Fortunato with an Amontillado. Fortunato has no reason to be suspicious. The two go into the cellar, which gives Montresor a convenient location to get rid of his enemy. If Fortunato liked fishing, Montresor would have taken him out on his boat and dumped him overboard. Montresor simply used what he had available to kill and hide Fortunato.