My understanding --admittedly limited-- is that in Japanese, people say as much as they can with as little words as possible. So I wondered why ないだろう would be used in everyday speaking instead of まい? The latter seems shorter and easier to use than the former.
To answer the question in the title, yes, it is generally only used in literary text and, I would say less often, on TV. It could also potentially be used in a really formal speech or something like that.
I remember in my 9th or 10th month of studying the language I tried this out on a Japanese friend, saying something like
行くまい instead of
行かないだろう. I got a weird look followed by a laugh, and he explained that it would never be used this way. The only explanation he could offer was that it sounded archaic, and this is the reason it's not generally used - the same reason that we don't start using old English in English conversations.
Sure, it's fair to say that users of the Japanese language tend to shorten things a lot, but that's not to say that the shortest way is always the normal or "modern" way. For example, the archaic form
いけない is not used in modern Japanese.