I believe this is the intended solution. (Black lines are part of the loop, while red lines were deduced not to be.)

Here's how I did it (I got lucky because of the assumptions I did):

Here, we can immediately mark the sides not part of a loop.
Suppose two of the lines in red square 3 that were part of the loop were like this. If the third line were at the bottom of the square, then there would be no place for another line for the triangle 2 underneath. But what if the third line were at the top instead? Then, we cannot make the two lines converge downward because a closed loop will form. Therefore, the bottom ends cannot make contact with each other.
If both ends went in opposite directions, the triangle 2 will not be satisfied. If both ends went left without touching, then there would only be one line of the triangle 2 satisfied. This is also true for the two ends going right.
These contradictions make us sure of which parts of square 3 are actually part of the loop: the top and bottom sides.

This also satisfies the purple triangle 1 above.

Assumption 1: The left side of the red square 3 is part of the loop. As you can see it affects many things.

Assumption 2: In the bottom figure, the top of the yellow triangle 2 is part of the loop.

What if this was the side of the blue bottom square 1 that was part of the loop?
Well, on the blue pentagon 3, you can do two things: 1) try placing two more lines on it, and 2) let the configuration of the lines be valid. I can assure you that these two things can’t be fulfilled simultaneously. Therefore, the right side of the square 1 is NOT part of the loop.

Instead, the top side is.

Assumption 3: The top and bottom sides of the red right square 2 are part of the loop. However, continuing this creates a contradiction in the orange pentagon 1, seeing that there are two lines where only one is needed.
Therefore, assumption 3 is false, and the top and bottom sides of the red right square 2 do NOT connect.
(Here, I realized that closing off the top part of the current loop (in the red side, whose ends come from the square 3 and right square 2), would lead to the same contradiction at the orange pentagon 1, as earlier. Therefore, we make it a point not to close off the loop.)
From there I joined up loose ends, and arrived at the solution on the top of this post of mine.