The only connection between electricity and wifi is your router needs electricity to run. If you power your router through battery, you do not need direct electricity. Apart from this, there is no other connection between your wifi and electricity. Router is a networking device that transfer data between the computers so that user can access internet. There are various reasons for slow internet connection and internet interruption. During the peak hours, when most of the people are accessing internet, your internet can become slow. During the bad weather such as rain, wind, or storm, internet connection can be interrupted or slow.
Speed of your internet connection also depends on your wifi router. If you are far away from the router, your connection can become slow. If your router is of poor quality, your internet speed might also be affected.