One thing I do, if I've typed out a long reply and I'm not sure if it might have timed out, or if something else might go awry (Internet connection glitch, or etc.), is quickly highlight and "copy" the reply. Then I just let it sit on my clipboard while I go ahead with the post.
If something does go wrong, I can just open a new reply window and hit "paste" to get a fresh copy.
It is SO disheartening to compose a long post and then have it go poof. Sorry that happened to you