Unless we are to assume that the Constellation's own captain died and Decker (like Stocker) simply happened to be on-board and took command?
No, I don't think the dialog
in the episode bears this idea out.
The Doomsday Machine wrote:
DECKER: It's just that I, I, I never lost a command before.
This sounds like the ship was his assignment; Decker did not just assume command of the Constellation
on his own authority when the assigned captain died.