Wouldn't you "write an ebook" the same way you write any other book?
InDesign is a page layout/design program not a word processor. If you're also laying out a book for print then using it to also produce an ePub might not be a bad option, but it seems like overkill if you're final production is going to be digital only. Also I can't imagine you'd want to do the actual writing in a page layout program.
Besides Word there is Open Office, Libre Office and IIRC the Writer 2 ePub extension works with both of those to output an ePub (don't know how good of a job it does). There is also Atlantis Word Processor and Scrivener is a popular program with many.
For good ePub editing tools there is Sigil and the editor in Calibre.