Observation of strong magnetoelastic coupling in a first-order phase transition of CrOCl