As to avoid confusion as much as possible and to get to the root of what I'm hoping to see is this. Let me start with a very simple snippet of code, and if you are willing, provide edits to it.
This is essentially how I have it today. How would you change it?
string returnHTML()
{
String strHTML = '';
int j =0;
while (j < 20000) {
strHTML += millis() + ": " + j.toString() + "This is a test.";
j++;
}
return strHTML;
}