That's interesting, I have a huge Database > 200K and so far 99% are with cover Art, I have never had a problem like that. What size is the folder.jpg? Is it realy a jpg or renamed tiff or something else?
All my files have the cover included into the Tags plus folder.jpg in each folder. BUT I have always 500x500px and the file size is always optimized so most of my cover art has only 30-60kb.
I'm using XNview to edit the cover, but since using primary Windows, I'm using not the MP Version.
https://www.xnview.com/en/If you are not so familiar with linux, here how to
https://linuxhint.com/xnview-mp-ubuntu-linux-mint/ Inside XNview for resize Shift-S
and save in optimzed size Strg-Alt-S
In my opinion the second failure (Heap Space) is because the folder.jpg