Sounds electrical... But these things are hard to diagnose over the Internet... Here is what bothers me, you said the battery terminal was loose and needed replaced, but if your motor is running the alternator should do the work if the battery is disconnected.
As for the rough idle, Boxer motors are a little rougher then other motors. But no they do not sound like they run on 3 cyl rough. Worst case you can do a compression test and see what it is your dealing with.
You have 1 of 3 issues at the least. Its either fuel, electrical, or mechanical. I would start with the least expensive thing first. Check that terminal get your connections right then try a compression test.
Like i said its hard to say with out actually seeing the car. Maybe someone will jump in who has had the same issue. But since you said that the electrical stopped working until you tried to start it in a roll leads me to think its all electrical.. But please keep in mind you may have more then one issue with the car.