denuseri took the words right out of my mouth.
However, I would like to add in that you need to afford him some respect as well. If he told you without any warning that you had to write a 10k word essay and you wanted to discuss your limits, that's probably a good time to safeword and go, "Hey, that's not cool. This was never discussed before, so springing an enormous essay on me without any warning whatsoever is entirely unreasonable," and discuss it from there. If you had agreed to that specific punishment previously, for some reason, or he told you (from the moment he started feeling like you were being inappropriate) that you needed to think about your words before you spoke, to the point where he said, "If you can't stop talking about this, you're going to have to write me that 10k word essay," and you kept pushing up to a million words, then that's on your own head. If asked my advice by a top in such a scenario, I'd ask him/her if the sub was worth the trouble. Truth be told, I'd ask the same in a similar, but vanilla, situation.
Most situations like this don't just have easy answers. My relationship is not your relationship is not her relationship, and so on. Nuances matter.
Either way, a million words sounds a little like his temper got the best of him, which can be dangerous.