We tend to use "boat" for smaller vessels, and "boating" tends to be a recreational activity, so if anything it would be a shipping accident.
Did the explosion kill him, or did the ship sink and he died in the sinking? If the former, I think it would be better to say that he died in an accident aboard a ship.
The Ngram Viewer indicates that "boating accident" is more frequent than "boat accident",
but, as sdgraham has pointed out, if it's big enough to have a cargo bay, you are talking about a "ship".
What then, sd?
"He died in a... shipping accident"? (But "shipping" can also be done by truck or train.)
An accident "at sea"?
He died in an accident aboard a ship.
A boat accident would involve the boat itself. A boat fell on him. He got a splinter from the decking.
A boating accident would involve the process/activity of boating. Two boats crashed or someone fell overboard while the boat was not docked.