Let's take, for simplicity a square with side length A
The area is given by A^2 .
Now let's imagine we want to "paint" the surface area of this square with a single, uninterrupted, line.
We start at the bottom left corner, and move up the square's side with our line for its length, A, then once we are on the adjacent side edge we move right along it for a length D, then down again for A, then right for D, then up for A etc. Eventually we end up in one of the right corners, and complete our drawing by moving down (or up) once more for A.
The formula of our line length is given by
(A + D) * (A / D) + A
Where A+D is the length of one "step" of our iteration, A/D is the number of steps we take, and the final + A is the remaining side.
If we take the limit of this length for D -> 0, we end up diverging to infinity (A^2/D is the core term), very far from the expected A^2.
Conceptually, I can understand that a line cannot fill an area, as there are dimensionally more points, but I don't see what's wrong with this construction by itself, as it's not that different than the one for integration by segments.
What's wrong exactly here?
If you view the square as the union of vertical line segments of length $A$, one segment for each $x \in [0,1]$, then their total length is clearly infinite (since they are infinitely many). So in your construction, when you use more and more of these segments, it's not too surprising that the length grows without bound.
The intuitive way to think about the area (at least in calculus) is that each segment has an “infinitesimal” area $A \, dx$ (the finite height $A$ times an infinitesimally small width $dx$), and you get that total area of the square by “adding up” (integrating) all these uncountably many infinitesimal area contributions: $$ \int_0^A A \, dx = A^2 . $$