The ideal shell script is a relatively short one, because shell script has such limited support for concepts such as variable scope, no support for a library or module system for robust packaging, a lot of global state of various kinds, and very limited data typing.
Instead of trying to write one very long program that does many things, follow the Unix tradition of writing shorter, smaller programs that do one thing each, and that do that thing very well.
If you find your Bash program is becoming too large and unwieldy, and you can't simplify it, consider translating it to Perl, Python, or a similar general-purpose program instead. This is quite normal; shell script has been used since its earliest days as a prototyping language, in exactly this way.