The complex analysis proof via the integral requires the path to be piecewise smooth. If you want the general result for arbitrary continuous paths, which is true, you can't use the complex analysis definition of winding number. And actually, the general winding number is easier to define, and it is intuitively obvious why it works. Let me give an intuitive sketch of the more general fact that the winding number (around the origin) is invariant under a continuous deformation of a continuous path that does not pass through the origin throughout the deformation.
Firstly define the winding number of a polygon. Next, every continuous path in the plane (function from $[0,1]$ to $\mathbb{R}^2$) is uniformly continuous, and so you can cut the path into pieces such that each piece lies in a disk of radius less than $1$ around some point in that piece. This immediately implies that if the path lies within the unit circle, then each piece lies in a disk that does not contain the origin. Hence any further subdivision of the pieces would not change the winding number of the polygon (around the origin) given by the starting points of the pieces (in order). Therefore we can define the winding number of the path to be the winding number of this polygon, since any two divisions of the path have a common refinement (i.e. with all the cut points in both of them).
Secondly, a continuous deformation of a continuous path in the plane is a continuous function $g$ from $[0,1]^2$ to points in the plane, where $g(0)$ is the initial path and $g(1)$ is the final path and $g(r)$ is the path at time $r∈[0,1]$. (Here we use the convenient identification $g(t)(u) = g(t,u)$.) Again, $g$ is uniformly continuous, so for any positive real $r$ you can cut $[0,1]^2$ into a square grid such that the image of each square under $g$ lies in a disk of radius less than $r$. (Intuitively, each square represents a short time period and a piece of the path such that the piece stays within the disk during that time period.)
Based on the above we can already easily check that any continuous deformation of a continuous path within the unit circle cannot change its winding number around the origin. Nevertheless, for completeness I will also explain why the winding number cannot change even if the continuous deformation is arbitrary, as long as the path never passes through the origin.
Define the distance of a path $f : [0,1]→\mathbb{R}^2$ from a point $p∈\mathbb{R}^2$ to be $d(f,p) := \inf_{x∈[0,1]} d(p,f(x))$ where $d(p,q)$ is the Euclidean distance between $p,q$. And if $f$ is continuous, then $d(p,f(x))$ varies continuously with $x∈[0,1]$, and so has a minimum by the extreme value theorem (EVT). Hence $d(f,p) > 0$ for any continuous path $f$ that does not pass through $p$. As before, we can cut $f$ into pieces such that each piece lies in a disk of radius less than $c$ around some point in that piece, and define the winding number of $f$ around $p$ as the winding number of the polygon given by the starting points of those pieces, because refinements of any such division give the same result.
Furthermore, if a continuous path never passes through the origin $O$ throughout its continuous deformation $g$, then $d(g(t),O)$ varies continuously with $t∈[0,1]$, and hence has some minimum $c$ by EVT again, which must be positive by the above. By the uniform continuity of $g$, we can cut $[0,1]^2$ into $s×s$ squares such that each square is mapped into a disk of radius less than $c/3$ by $g$. Then for each $k∈[0..1/s-1]$, the points $\{ g(s·a,(s·b)\%1) : a∈[k,k+1] ∧ b∈[m-1,m+1] \}$ are all within a disk that excludes $O$ for every $m∈[0..1/s-1]$. Note that the winding number of the path $g(t)$ is equal to the winding number of the polygon $P(t)$ whose $m$-th vertex is $g(t,s·m)$. And $P(s·k)$ has the same winding number as $P(s·(k+1))$, since we can iteratively move the vertex $g(s·k,s·m)$ to $g(s·(k+1),s·m)$ for each $m∈[1..1/s]$ without changing the winding number of the polygon. Therefore the winding number of $g(0)$ and $g(1)$ are equal. (Note that we define $x\%y := x - \lfloor x/y \rfloor · y$ for every reals $x,y$ such that $y > 0$.)