The black smoke indicates it is running rich which means there is no shortage of fuel in the cylinder.
That leaves a shortage of air or improper injector timing.
The easiest to test is air. I would remove the intake hose from the intake manifold and run it briefly to see if the problem clears up. Do this in as clean of conditions as you can as there will be no air filtration but if only run briefly won't do any harm.
BTW: When you have a runaway the best thing to do is cut off the air as quickly as possible. A rag over the intake port of the air cleaner housing is usually enough. I know diesel mechanics that keep a small square of cardboard or plywood handy when they have installed a new (or rebuilt) engine or are working on the fuel system. They don't have the air cleaner connected or have a way to easily reach the intake port. Ready at an instant to slap the board on the intake if it should ever over-rev. I have 6" and 8" round pieces of 1/2" plywood with handles that I use. The danger of using a rag is that it could be sucked in.
Since this has not happened since, it just occurred to me that it might have been a stuck governor issue, but I don't know enough about that to part of the system. I also don't know if a governor could be the cause of the bogging down. Hopefully someone else will chime in on that.
Bob Rooks are you watching this one?