The only thing that matters is who will do the most to solve the illegal immigrant problem. If you think Democrats will, then you should strive to elect them; if the Republicans, then them. Anything else is foolishness.
To elect Democrats, though they make the problem worse, in order to punish the Republicans, or to do the converse, would be a pyrrhic victory.