If it's a lethal fence and a child doesn't know what it is, what is going to happen? If it happened on the Mexican side, that could be enough to cause a war. Furthermore, who is going to pay for it? Most of our citizens do not pay their taxes. That would mean our nation's law abiding citizens would go broke.
Building an electric fence on the America Mexico border is a bad idea. When you build a fence, it is just a physical barrier to an extremely large problem. In order to control the immigration problem in America, you should provide a relatively easy and legal path for people to become citizens.
An electric fence would be a huge waste of money. People could still find ways around it. It would require costly upkeep as well. One of the most simple ways around e problem would be to simply enter America as a guest or on a temp visa and just not leave. There are also tunnels and sewers.