Transfinite induction on inductively constructed CW complex Let $X$ be a 2-dimensional path-connected CW-complex and let $W \subset X$ be a subcomplex. Further let $I$ be an index set of the path-components of $W$. 
Consider the following iterative procedure:
Let $X_0 = X$ and $W_0 = W$. In this given scenario there exists a specific path $\gamma_n$ in $X_n$ which is not arbitrary that connects two components of $W_n$. Note that this has to be a specific path which can be proven to always exist nad is contained in the 1-skeleton of $X_n$. Now attach a new 1-cell $e_n$ to $W_n$ connecting the start and end point of $\gamma$ and glue in a disk $D_n$ along $\gamma_n * e_n^{-1}$. Call this space $X_{n+1}$ with new subcomplex $W_{n+1}$. The number of path components of $W_{n+1}$ have been reduced by one and the new space $X_{n+1}$ has $X_n$ as deformation retract as you can pull in the disk $D_n$ into $\gamma_n$.
Now if $I$ is finite this process will reduce the components one by one and eventually make $W'$ connected. The resulting space $X'$ is still a deformation retract of $X_0 = X$.
But what if $I$ is not finite but arbitrary large, possible uncountable. Can this procedure still be carried out such that in the end $W'$ becomes path connected and $X$ is still a deformation retract of $X'$?
Secondly assume that there is given a map $f: X \to Y$ for some space $Y$ and at every stage the map can be extended to the newly attached cells $D_n$. Then in the finite case the map $f$ can clear be extended to all of $X'$. Is this also true for the infinite case?
What I have tried so far: I would like to do a colim argument, but there are some problems. Those new cells can not be attached all at once, as the new paths may have nonempty intersection with previous attached 1-cells. If one takes the union of all those constructed $X_n$ I do not see, why $W'$ should be path connected. I know that every two components should eventually become connected but does this argument still holds if there are infinitely many? There are no information at which step this would be the case. Same for the homotopy deforming $X'$ back into $X$. The easiest argument for a infinit union of CW complexes would be that each sphere has to lie in one finite stage and for this stage there is clearly a homotopy into $X$, thus the inclusion of $X$ becomes a weak equivalence and thus, as $X$ and $X'$ are CW-complexes, it is a homotopy equivalence.  
 A: Here's what you do.  We define a sequence of CW complexes $X_\alpha$ and $W_\alpha$ for ordinals $\alpha$ by transfinite induction, where $W_\alpha$ is a subcomplex of $X_\alpha$ and if $\alpha<\beta$, $W_\alpha$ and $X_\alpha$ are subcomplexes of $W_\beta$ and $X_\beta$, respectively.  Start with $X_0=X$ and $W_0=W$.  Given $X_\alpha$ and $W_\alpha$, if $W_\alpha$ is path-connected, stop the induction.  Otherwise, pick two path-components of $W_\alpha$, pick a path between them (starting and ending at two $0$-cells) in the $1$-skeleton of $X_\alpha$, and glue in a new path and disk as you describe to get $W_{\alpha+1}$ and $X_{\alpha+1}$.
At limit ordinals, just take colimits.  That is, if $\alpha$ is a limit ordinal and we've defined $X_\beta$ and $W_\beta$ for all $\beta<\alpha$, define $X_\alpha$ to be the colimit of the $X_\beta$ and $W_\alpha$ to be the colimit of the $W_\beta$.
Now there are some things we need to verify by induction.  First, each $X_\alpha$ deformation-retracts onto $X$.  At successor steps, it is clear that $X_{\alpha+1}$ deformation-retracts onto $X_\alpha$.  At limit steps, we can see that the inclusion $X\to X_\alpha$ is a weak homotopy equivalence since every map from a sphere to $X_\alpha$ factors through $X_\beta$ for some $\beta<\alpha$, and then it follows that $X_\alpha$ deformation-retracts onto $X$ since $X$ is a subcomplex of $X_\alpha$.
Let's also verify that for each $\alpha$, the map $\pi_0(W)\to \pi_0(W_\alpha)$ is surjective.  At successor steps, it is clear that $\pi_0(W_\alpha)\to\pi_0(W_{\alpha+1})$ is surjective.  At limit steps, just note that every point of $W_\alpha$ is in $W_\beta$ for some $\beta<\alpha$.
In particular, let $\sim_\alpha$ be the equivalence relation on the set $\pi_0(W)$ defined by $x\sim y$ if the images of $x$ and $y$ in $\pi_0(W_\alpha)$ are equal.  Then the relations $\sim_\alpha$ are a strictly increasing sequence of equivalence relations, since for each $\alpha$, two path-components of $W_\alpha$ become the same in $W_{\alpha+1}$.  Since there is only a set of different equivalence relations on $\pi_0(W)$, this increasing sequence must eventually terminate.  That means the transfinite induction eventually terminates: that is, $W_\alpha$ is actually path-connected for some $\alpha$.
We can then define $X'=X_\alpha$ and $W'=W_\alpha$ for the $\alpha$ at which the induction terminates, and these will have the properties you ask for.
As for your second question, again the answer is yes.  If you have a map $f:X\to Y$ and you know that you can inductively extend it from $X_\alpha$ to $X_{\alpha+1}$ for any $\alpha$, then it can be extended to all of $X'$.  Indeed, we just construct a sequence of extensions $f_\alpha:X_\alpha\to Y$ by induction on $\alpha$.  At successor steps, we use the given assumption to extend $f_\alpha$ from $X_\alpha$ to $X_{\alpha+1}$.  At limit steps, we just use the fact that $X_\alpha$ is defined as the colimit of $X_\beta$ for $\beta<\alpha$.
