Question: After a few weeks of using El Capitan seemingly random messages started appearing blank. Viewing the messages in the Google web interface showed that they were not blank.

Restarting the app usually fixes it.

I deleted all my emails (by deleting mail folder ~/Library/Mail) and started again - and it was OK for about a week - and now it's started doing it again. Rebuilding mailboxes doesn't help.

I found links around the web to cases of this back in 2010/2011 - like this
<https://discussions.apple.com/thread/2364054>

But it appeared to go unsolved.

Is this just a bug in El Capitan - and is there a solution?

Answer: 
You could try to delete the whole Mail folder here:
 ~/Library/Mail

and delete the mail preferences files in

~/Library/Preferences

Then reconfigure the Mail. This will of course delete emails which are only saved locally. Instead of deleting you could of course close the app and move the files to another location for backup.

I've seen the same issue happening. The problem occured after switching the mail server. I had tried everything I could think of like rebuilding the mail box, deleteting the mailbox indexes, renaming mail boxes, force re-downloading the emails, re-adding the email account. The only thing that worked was deleting what i mentioned above.
Most mail issues can be reduced to a specific fault with a little troubleshooting.

Open the connection doctor window in Mail.app and see if you can determine one specific mail host with issues.

Then set up a new user account with only that mail account and enable logging. At that point, you will know if you have a networking issue, a problem with one computer or a problem with one mail provider and your specific mail client.

Then you can decide to work with support for that mail provider, document the failure here with specific error messages and/or determine that you have a temporary issue that clears up over time due to capacity or temporary networking issues / delays / one host.