Red, 136 120120 86 bytes
func[s][a: charset"<>"until[parse s[any[change["("t: a"<"a")"](t/1)| change["("a">"t: a")"](t/1)| skip]]2 > length? s]s]
More readable: This version is courtesy @hiimboris (https://gitter.im/red/parse)!
f: func[s][
a: charset "<>"
l: [change["(" tfunc[s][r: a "<"["<"|">"]while[parse as[to ")"]change["(t/1)]
r"x: [change["(" a ">"r["<"r t|">"x: a "r]")"](tx/1)]
until [
parse s[any [l | r | skip]]
single? s
]
to s
]end]][]s]