I think when you export your Google account data you have options on how it will split your Gmail across mbox files, and I think you can pick an option to split it by labels/folders.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments