This is the uber-.twmrc. The bomb, the mac, the king. This is just the ultimate in .twmrc-adge. It's fairly well commented, and pretty straightforward. (Look familiar? ;)
The big advantage this gives you is the ability to dynamically generate the menus. For most people, all this'll do is complicate stuff for you. For people who use twm and have a massive intricate menu structure, especially if you change it alot, this will help you.
Its other advantage is that it's exceedingly modular. Instead of one big config file, it's broken down into a number of small config files. It's also 'portable', in that it has provisions to work with regular twm, as well as ctwm (which I use and recommend), both with and without m4 support.
The current version is twmrc 1.0. Don't expect new versions any time soon; it already does what I want it to, I've been running it in various incarnations for years, and I don't know of any bugs.
This is the version that I run myself. My menu structure is, of course, much bigger and more intricate, and a number of minor details in the variables are different. But, this should give you a close approximation of my environment, with the ability to customize it yourself with a good bit of ease.
To install, download and unpack the tarball. There's a README file within it that has instructions, as well as a summary of how to use and modify the files. If you have any questions it doesn't answer, email me and I'll see if I can't answer them (and put them in the README for potential later releases).