In my early days of learning guitar, I would hold up an acoustic guitar by the neck with my index finger across the entire fret board and my thumb against the back of the neck; like pinching the next with just those two fingers. I would start at the highest fret (close to the body of the guitar) for a period of time or as long as I could. I would then work my way down the fret board over a period of time...kinda like practicing scales or patterns. So, at the lowest end of the fret board would be the toughest since you will be holding up the guitar with the majority of weight at the bottom.
After doing this (especially with a nylon/classical guitar) for a while, you will quickly find how easy it is to bar chords on an electric.
Kind regards,
Living Room Rocker