‘Cock’ is actually a pretty damn old euphemism. It appears in some middle English poetry as ‘cok’, if that tells you anything. Officially it doesn’t enter widespread use until as late as the seventeenth century, but that doesn’t stop poets and monks as far back as the eleventh century from alluding to the way a fighting-cock’s wattles turn red and stiff during a battle.
Depending upon the character, I imagine Tolkien could have got a lot of variety in his dingdong discussions. Archaic terms for ‘penis’ are not only richly varied but highly regional— see the ‘langer’ in Ireland, or the ridiculous-sounding ‘todger’ in the UK/Australia. And I do believe Tolkien came up with not one, but several Elvish words for penis: gwî for poetic use (elves writin’ porn yeeeah) and gwib for daily use, plus puntl in case you need to contrast two elves’ differing backgrounds. (I don’t believe we have a Noldor ‘penis’, but having variety in slang is always good for characterization.) [Source]
As for the dwarves, I have shamelessly used Khuzdul-sounding English terms like pud and lome (fifteenth-century slang referring to a ‘loom’). I can also see the dwarves using terms like ‘tool’ and ‘shaft’ much more readily than most other races, since they are workin’ dudes.
Humans can go with damn near anything. I prefer to give them more modernized, recognizable terms for ‘penis’, since we’re supposed to share genetic material anyway and we might as well communicate with each other. (And by ‘modernized’ I mean ‘sixteenth century or later’.) ‘Cock’, ‘prick’, ‘tool’, and perhaps ‘dick’ all work here. (If you’re not writing erotica, ‘pizzle’ and ‘piece’ are common terms. We’re also now treading on Shakespearean grounds, where spontaneous euphemism has become much more widely bandied and recognizable.)
Hobbits are a little tricky. On the one hand, the roly-poly provincial way Tolkien portrays his hobbits makes me shrug and think, okay, ‘todger’ it is. On the other hand, I don’t particularly want to write all my hobbits as shy violets who use polite euphemisms for everything. So lately I’ve been trying out some of the simpler archaics: ‘pin’ (or ‘pyne’), ‘yard’ (as a stick, a unit of measure), ‘stud’, and (of course) ‘cock’. (Most of these are farming terms, too, which fits with the style of the hobbits.)
I just like cock, okay? *shrug*
A few more archaic curiosities: ‘erection’ often becomes ‘pride’, ‘stand’ (as in ‘cockstand’), or even ‘tend’ (from the Latin for ‘stretch’); ‘cod’ is often used in preference for the scrotum rather than the entire external male genitalia, thus ‘codsack’; and the further back you go, ‘balls’ becomes ‘bollocks’ becomes ‘ballocks’, and also ‘baubles’, ‘knappes’, ‘cullions’ from ‘sceallan’ (shells), and ‘herthan’ (with the ‘herthan-belig’ or testicle-purse). Feel free to Tolkienize the most archaic terms— the -an ending denotes a plural, so change it as you see fit.
One of the best sources I can give you is this excellent book, the sample of which should keep you writing archaic smut for ages before you even consider buying it (which I suggest, if you like these things). I have used it gratuitously here as a source.
Thanks for the interesting question, by the way— and, uh, sorry for sprawling it out into an essay. You might say my answer became… engorged.
i love you