For continuous local martingales $X_t$, it is known (theorem 3) that $X_t$ and $[X]_t$ have the same intervals of constancy almost surely, by conditioning over the event $[S,T]$ you get the result in that case.
Nevertheless and contrary to what I said before editing the answer, I have a found simple counterexample for general local martingale (i.e. with jumps).
Let's take the (local) martingale $X_t= N_t-t$, (where $N_t$ is a Poisson process of intensity 1), and for $S=S_1$ the first jump time of $X$ and $T=S+1$ (here $S_i$ is the $i$-th jump time of $N_t$), then the event $A=\{\omega\in\Omega s.t. T<S_2\}$ has strictly positive probability equal to $e^{-1}$ (it is widely know that inter-arrival times for Poisson process of intensity $\lambda$ follows an exponential law of parameter $\lambda$).
So on $A$, we have $[X]_S=1=[X]_T$, but $X_S=1-S$ and for $t\in[S,T]$ we have $X_t-X_S=(1-t)-(1-S)=S-t$ which is not constant but continuous of finite variation, and so $X_t$ isn't constant on the interval $[S,T]$ almost surely as $A$ has positive probability.
This shows that the conclusion is wrong in general case.
So I think, that you omited to mention that your problem was only in a continuous process setting, as it is the only place where it is true.
Edit :
I felt that my preceding wrong proof was fishy sorry for that.
Edit 2:
Thanks to Didier Piau for pointing out a clarification of the argument.
Best Regards
NB:
Notice that the result (in continuous process setting) is more general as it works for all continuous local martingales and not only for continuous strict local martingales.
Your intuition is good, but there are some technicalities you should be careful about. WLOG $M_0 = 0$. Start by assuming $M$ is a continuous martingale of bounded variation. Then if $B$ is a bound on the variation of $M$, and $(t_i)$ is a partition of $[0,t]$,
$$
E[M_t^2] = E\sum (M_{t_{i+1}}-M_{t_i})^2 \leq B E[\sup_i|M_{t_{i+1}}-M_{t_i}|].
$$
Since $M$ is continuous the supremeum tends to $0$ as the partition size goes to $0$. Moreover, the supremum is dominated by $B$, and hence dominated convergence tells us that $E[M_t^2] = 0$, in particular $M_t=0$ a.s. Let $t$ run over rationals and use the continuity of $M$ to conclude that $M=0$.
Next, if $M$ is a continuous local martingale, take a localizing sequence of stopping times $(\tau_n)$. We then find that $M^{\tau_n}_t = 0$ for all $n$, and so taking the limit in $n$ gives $M_t = 0$ a.s. Again let $t$ range over rationals.
Best Answer
$(X^T_t)^2-\langle X\rangle^T_t = X^2_{T\wedge t}-\langle X\rangle _{T\wedge t}$ is a local martingale, being the local martingale $X^2_t-\langle X\rangle_t$ stopped at time $T$. But $\langle X^T\rangle$ is the unique continuous increasing process that compensates $(X^T)^2$; namely, which when subtracted from $(X^T)^2$ yields a local martingale. This uniqueness forces $\langle X^T\rangle = \langle X\rangle^T$.