This version is a bit more involved than the other answers given above, but it respects the condition on the arities of the functions.
ClearAll[plus, times, div, m, f, g, h];
m = 5;
f[a_, n_] := Symbol[FromCharacterCode[96 + n] <> ToString@a];
g[a_, n_] /; (n <= 1) := f[a, n];
g[a_, n_] := Replace[RandomChoice[{1, 2}], {1 -> f[a, n], 2 -> h[a + m + 1, n - 1]}];
h[a_, n_] /; (n <= 1) := g[a, n];
h[a_, n_] := Replace[RandomChoice[{
{plus, RandomInteger[{2, m}]}, {times, RandomInteger[{2, 5}]}, {div, 2}
}], {s_, t_} :> s @@ Map[g[a + #, n] &, Range@t]];
h[n_] := h[0, n];
Most of the awkwardness is due to the fact that the accumulator a
tries to force the creation of a new symbol each time. You can test it as follows:
h[5] // FullForm
(*
plus[e1, times[d9, div[c17, plus[a31, a32, b27, a34]], d11, times[c19, plus[a33, a34, b29, a36]]], div[d10, plus[plus[b25, b26, b27, a34, b29], plus[b26, a33]]], e4]
*)
h[3] // FullForm
(* div[plus[a14, a15, b10, a17], c2] *)
TreeForm[(X + Y) (Z + W)]
? $\endgroup$ClearAll[x,y]; TreeForm[x + y]
! $\endgroup$