1. Earliest use in the neutral sense of speedy in "Dear Mr. Banker", by Nicholas P. Mitchell, published in The Greenville News of January 14th 1950:
"By the way, in spite of the fact that various Greenville bankers have explained to me why it isnât a good idea, I still wish every bank had at least one tellerâs cage reserved for people who want to cash a check or to make an individual deposit. Such transactions require about half a minute, but it is not unusual to wait in line fifteen minutes or more while those who are banking on behalf of business get their requirements met. ... But if we small fry had a âwham, bam, thank you maâam,â line of our own, weâd all save a lot of time."
The phrase merely referred to suddenness before it was used as a slang for quick sexual intercourses.
2. The earliest occurrence of wham, bam, thank you maâam with reference to sex is from the review of Ball Four (World Publishing Co. â New York, 1970), by the American baseball player James Alan Bouton, hence 20 years after its first use as an adjective. Bouton's review was published by John Justin Smith in the Star-Gazette (Elmira, New York) of June 10th 1970:
"Bouton says of ball players that they are not, by and large, âthe best dates. They prefer wham, bam, thank you, maâam affairs.â
3. It's used in the military to denote a sudden, forceful effect. Feel free to also use it to denote any sudden, quick action or effect, not just sexual ones. The intended meaning is highly contextual.
"One of the most impressive things in the book is the lightning suddenness with which capital ships destroy one another. Wham! Bam! Thank you maâamâand there goes a few hundred millions of somebodyâs money to Davy Jonesâ locker."