After much more fooling around, I've figured out that the detail is there in the RAW image I was looking at, it was just masked by the white balance and colour profile used to convert it to RGB. If I use "no profile" in ufraw or RawTherapee, I can easily see the same details that are shown in the Canon JPG image. So, there wasn't any information lost or hocus pocus done by the Canon firmware as I originally feared. With RawTherapee, I can sharpen the image in much the same way that Canon does. So what's left is the noise reduction. The camera does a good job of smoothing the considerable noise in the A4000 without sacrificing much detail. That seems to be the hard part for me to duplicate starting from the RAW image.
As a digital photography newb, I can say that this stuff is complicated!