"thinking of a way to create an "optimal" language"
The Korean tried inventing an optimal alphabet a few centuries ago and it caught on. [0] Traditional Korean writing (in Chinese characters) has been almost abandoned.
The Korean Hangul alphabet doesn't include all possible sounds but I don't think that's really what you want. All those guttural consonants, tonal vowels, and clicks and snaps and buzzes that are possible add complexity, but the real breadth of words is mostly combinatorial rather than based on having a lot of letters.