I suggest formulating this as an instance of SAT.
You can formulate this as an instance of SAT by thinking of it as trying to color each square in the grid with a color. For each color, arbitrarily designate one of the two endpoints as the "starting position" for that color, and the other endpoint as the "ending position". Define boolean variables $x_{i,j,c,k}$, with the intended meaning that $x_{i,j,c,k}$ is true if grid square $(i,j)$ is colored $c$ and is the $k$th square along the path from the starting position for $c$ to the ending position for $c$.
You can write down a boolean formula representing the constraints on the variables $x_{i,j,c,k}$ that must hold, for this to be a valid solution to the puzzle. For instance:
If $x_{i,j,c,k}$ is true, then either $(i,j)$ must be the end position for color $c$, or else $x_{i',j',c,k+1}$ must be true for some square $(i',j')$ that is adjacent to $(i,j)$. Moreover, this is true for exactly two squares (not more, not less), unless $(i,j)$ is the starting position, in which case it is true for exactly one square.
For each square $(i,j)$, exactly one of the $x_{i,j,c,k}$ is true.
If $(i,j)$ is the starting position for color $c$, $x_{i,j,c,0}$ is true. If $(i,j)$ is the ending position for color $c$, one of $x_{i,j,c,k}$ must be true.
And so on. This ensures that the solution to the formula contains a path that starts at the starting position for color $c$ and ends at the ending position.
Then, feel this boolean formula to an off-the-shelf SAT solver and ask it to find a solution.
This may be an effective solution for the puzzle sizes you mention. I expect it may be more effective than trying to write your own custom rules, as SAT solvers embody many clever strategies built up over decades of research to try to find solutions for these kinds of combinatorial questions. At least, it should be pretty easy to implement in just a few hours and see how well it works.
Apparently, this puzzle is NP-hard, so you should not expect to find a polynomial-time solution. This suggests to me that a SAT solver might be a reasonable approach.