The story
Origin unknown. First known use as a verb is 1905, as a noun 1948. Perhaps compare regional slang term wang, whang (“to whack or beat”). Compare Dutch wanken (“to move back and forth; move with the hands”).
Etymology from Wiktionary, CC BY-SA 4.0.