Generally after Scotty, Sulu was put in command. Hell, in "Journey to Babel", Kirk put Ensign Chekov
in command, with Lieutenant
Uhura sitting right there!
Star Trek Writer's Guide, Third Season wrote:
LIEUTENANT UHURA--- Communications Officer, played by attractive young actress Nichelle Nichols. Uhura was born in the United States of Africa. Quick and intelligent, she is a highly efficient officer and expert in all ships systems relating to communications. Uhura is also a warm, highly female female off duty. She is something of a favorite in the Recreation Room during off duty hours, too, because she sings -- old ballads as well as the newer space ballads -- and she can do an impersonation at the drop of a communicator.
To be perfectly honest, I really have no idea where the idea that Uhura was fourth in command came from. The closest she ever came was "The Lorelei Signal" in TAS, and that was only because the entire male crew was incapacitated and she was the senior female bridge officer, not because of where she was in the normal chain of command.