Homotopical Analysis of 4d Chern-Simons Theory and Integrable Field Theories