In mathup[1] I handle this by allowing authors to strategically place space around groups they want to operate on:

    e^ x-1  <- "e with x minus one as superscript"
    e^x - 1  <- "e with x as superscript minus one. Same as e^x-1"
    f_ i(x)  <- "f with i of x as subscript"
    f_i (x) <- "f with i as subscript of x. Same as f_i(x)"
I also implemented invisible operators (plus, times, function application, and separator) with special operators (`.+`, `.*`, `.$`, and `.,` respectively) so authors can be explicit about their intentions (and output more accessible expressions)

    f_i .$ (x)
    a / b.*(1 - x)
    sum_ X_ i.,j
1: https://mathup.xyz/