One problem that occurs to me is that there are many ways of "simplfying" such mathematical expressions, and it would be very difficult to formulate rules to choose an efficient sequence of simplifications. For example one could proceed
by simplifying the "innermost" expressions and proceed outward, but that might be very inefficient in some cases.
I.e., if we had an expresion of the form:
(a+b)(c+d)+(a+b)(e+f)+(a+b)(gh+ij+kl) then one should clearly factor out (a+b) first instead of computing a+b 3 times. Of course, one could just formulate some simplification scheme, but it might not be at all like what one would do in practice in many cases.
Maybe I didn't understand what you wanted to do completely,
though.