Collapsing X to a point turns \Sigma_q\times[0,1] into \operatorname{Cone}(\Sigma_q), so W/X=C_q; let \kappa\colon W\to C_q be the quotient map. It is a homeomorphism from W\smallsetminus X onto C_q\smallsetminus\{v\}.
Step 1: \pi_1-injectivity (cf. [DJW, Lemma 2.2]). Let \widehat W\to W be the pullback of the universal cover \widetilde C_q\to C_q along \kappa. It is obtained from \widetilde C_q by replacing each lift v_\lambda of v, together with its open cone neighbourhood, by a copy X_\lambda\cup_a(\Sigma_q\times[0,1]); in particular it is connected. Fix a lift v_0. Since \widetilde C_q is CAT(0), each point y outside the open cone neighbourhood of v_0 is joined to v_0 by a unique geodesic, which crosses the cut surface \Sigma_{(0)} at v_0 exactly once (inside each cube at v_0 geodesics from v_0 are straight segments, and the cut is an affine hyperplane). Mapping y to this crossing point defines a retraction \rho onto \Sigma_{(0)}\cong\Sigma_q, continuous because geodesics in CAT(0) spaces depend continuously on their endpoints. Define R\colon\widehat W\to X_0=X as follows:
on the lift of M_q, R=a\circ\rho;
on X_0, R is the identity, and on its cylinder R(\sigma,t)=a(\sigma);
at \lambda\ne0: \rho is defined on the whole closed cone neighbourhood of v_\lambda, so its restriction to the cut surface \Sigma_{(\lambda)}\cong\Sigma_q extends over a cone and is therefore homotopic to a constant map by a homotopy H\colon\Sigma_q\times[0,1]\to\Sigma_q with H_1=\rho|_{\Sigma_{(\lambda)}} and H_0 constant. Put R(\sigma,t)=a(H(\sigma,t)) on the cylinder and let R be constant on X_\lambda.
These definitions agree on overlaps, so R is a retraction of \widehat W onto X_0. Hence \pi_1(X)\to\pi_1(\widehat W) is injective, and so is \pi_1(\widehat W)\to\pi_1(W); their composite is induced by X\subset W.
Step 2: a CAT(0) quotient (cf. [DJW, Lemma 2.6]). Let U\subset\widetilde W be the preimage of X. By Step 1 and Lemma 2.4, its components U_\alpha are copies of \widetilde X. Collapse each U_\alpha to a point v_\alpha to obtain a space V, and let V_0=\{v_\alpha\}. As \widetilde W is simply connected and the U_\alpha are disjoint connected subcomplexes, V\simeq\widetilde W\cup\bigcup_\alpha\operatorname{Cone}(U_\alpha) [Hatcher, Ch. 0] is simply connected by van Kampen’s theorem. The cylinders attached to U_\alpha become cones with apex v_\alpha, and each truncated cube together with the cone on its cut triangle becomes a full cube; so V is a cube complex. The vertex links at old vertices are copies of L_q. The link at v_\alpha is the preimage in \widetilde W of the cut surface adjacent to U_\alpha, that is, the pullback of \widetilde X\to X along a: a disjoint union of covers of L_q. Covers of L_q are flag: the vertices of a clique in a cover project to pairwise adjacent, hence distinct, vertices of L_q, which span a simplex; this simplex lifts to a simplex through any vertex of the clique, and since a covering map is an isomorphism on the star of a vertex, the lift contains the whole clique. Hence V is CAT(0) (by [Leary], as V need not be locally finite), so contractible.
Step 3: homology. Since (\widetilde W,U)\to(V,V_0) is a relative homeomorphism of CW pairs and V_0 is discrete, H_2(\widetilde W,U)\cong H_2(V,V_0)\cong H_2(V)=0. Hence H_2(U)\to H_2(\widetilde W) is surjective. By Lemma 2.4, \pi_1(W) permutes the components of U transitively, and the component through the base point is a copy of \widetilde X with H_2=\pi_2(X). Since \pi_2(W)=H_2(\widetilde W), it is generated over \mathbb Z[\pi_1W] by the image of \pi_2(X).