Re: 87-89 merc 70hp
Certainly it could be electrical. You could have a sark problem to one or more cylinders. Does it run okay at lower RPMs only to fall apart above half-throttle? If so I'd suspect a bad stator or bad switchbox. You can test the stator with a common ohmmeter, but you can't test the switchbox without a special meter or adapter.
You can diagnose spark problems with a timing light. Connect it to each cylinder in successive runs. If it flashes, it's sparking. If it's misfiring, you'll see it. You don't have to point it at the flywheel, just look at the light. I usually tape the trigger on and set it someplace where I can see it while driving.