I don't like this idea, for the unintended consequences of it. Most of the illegal immigrants come from 3rd world shucksholes. Humans are smart, I don't know exactly with what they will come up with to counteract that, but I'm guessing the outcome will not be good. (Running generators at all hours of the day or night, stringing extension cords from neighbors-who knows).
If this extended to water/sewer it would be way worse. You don't want them all crapping in the back yard. Unfortunately it's coming to doing stuff like this--making their life more difficult---rather that what should be done, arrest them, and deport them.
The only way this could be effective is to spread the strong and clear message
across the border and throughout Central/South America that entering the US
illegally will
deny you the very things that attract you to come here.
IOW,
"If you come here illegally, you will be denied 'the American Dream' that you find so attractive!"