I would never put anything in writing in a resignation letter that you wouldn't want posted on a billboard along the freeway.
Engineering companies, in most towns, have a lot of in-breeding...anything you put in that letter that is negative or that could even remotely be construed as negative could easily be seen by a future employer, so why chance it?
Plausible deniability is my motto...if you don't write it down, they can't prove you said it. If you really hate your boss that much, or if the conditions of the job were really that bad, then have the courtesy to talk to your boss, or the HR department, and let them know that you just didn't fit into the environment -- you don't even have to tell him he's the problem...heavy turnover rates will let him know eventually something is wrong.
The last place I worked was awful. I loved the work but engineering management was the worst I've ever seen. I let him know that I was leaving because I wanted 40 hour work weeks instead of 50 (routinely, workload wasn't that high...) and that his suggestions to work thru my lunch each day probably weren't legal (unpaid lunch hour mandated by the company).
The job I left has been on multiple websites, along with another position they can't fill, since October (5 months now and no takers!) so I'm fairly certain they can figure out on their own that isn't the most desirable working conditions for prospective employees... it doesn't take me putting it in a resignation letter to make it clear, and if that management ever leaves the company, I'd be happy to return because I truly loved the work, so why burn a bridge?
I recently looked at the website for that company and lo and behold - my old manager is no longer the engineering manager! He's now just the sales manager, and one of my ex-coworkers is now the engineering manager.
And that proves to me that Earl is right, there is such a thing as karma...