The messages that are grouped in a conversation could be saved as a single file or forwarded.
The messages that are not part of a conversation or a large number of conversations, should use something else to be saved or integrated in a single file. Fortunately there a lot of tools and examples of Google Apps Scripts, but I don't know if there is one that to "the trick" in one step. I think that this will require two major steps.
- Create documents for each conversation or message.
- Merge the documents into a single document.
Bear in mind that some file formats have their own caveats to managing large content, so instead of having one single file could be better to rely on the file management and indexing features of the operative system or services like Dropbox, Google Drive, OneDrive, among others.
For Gmail messages that are grouped in a conversation
From Print mail
To print an entire conversation:
Open the conversation you want to print.
Click the "Print all" button Print icon, located above your message pane.
This will show a "printable" version of the conversation. You could "print" them as PDF or save the resulting page in other formats.
From Forward messages
Forward an entire conversation
1. Open the conversation.
2. Click the More button in the toolbar above your messages and select Forward all.
When you forward an entire conversation, all messages from the conversation are put into a single message. Each message is clearly marked and listed in chronological order, from oldest to most recent, so that the conversation is easy to read.
Other tools and Google Apps Script examples
IFTTT If labeled "drive" in Gmail then save to Google Drive.
(more could be be added later)