Ok, I've figured out the problem.
The code Apple started with does the same thing Joe's program does,
only it isn't quite as configurable *grin*)
I first tried removing the code that highlighted the selected text,
thinking that perhaps for some reason, vo was making the program
think only part of the text was highlighted.
However, this had no effect.
So, after further experimentation, I discovered that the problem is
voice over itself.
For some reason, the text-to-file process must use the speech
channel. If voice over tries to talk during this process, it cuts
off the output to the file, and causes it to end short of completion.
Short answer?
turn off voice over and click the mouse on the save button (after
you've selected the file name and where to save it).
This will perform the export with no interruptions from voice over.
And, even if vo doesn't try to talk, it still interrupts the export
sometimes if a speech event comes in while the export is taking place
(no clue why) but there you have it. I've successfully exported 5
chapters of a book using this method, and only 1 with voice over
turned on, so now we know.