On property (T) for $\mathrm {Aut}(F_n)$ and $\mathrm {SL}_n(\mathbb {Z})$