Muckenhoupt $A_\infty$-weights and representation theorems for functions of $\mathrm{VMO}$