The reason for command structure and chain of command is that is there are necessary decisions to make and someone needs to be responsible for making them. If decision is needed fast, people need to know who is responsible for making the judgement call and whose "opinion" is the final word.
Since deciding who that person is is also a decision that takes time to make, all decision making positions for potentially urgent decisions need to be assigned in advance and be stable enough that they are unlikely to change without somebody knowing it.
Similarly the relationship and hierarchy between the decision making positions must be non-ambivalent. If the ships crew is large enough to have sections with their own leaders the relationship between those leaders and who makes decisions about how they cooperate needs to be predetermined and stable.
For warships the familiar system of captain and officers is the simplest model of how to do this. And simple is the virtue here. Military command structures must be robust and stable under casualties. They also are specifically designed for handling life and death decisions under pressure.
But there is no need to assume such extreme conditions apply. And indeed even on military organizations they do not apply universally.
I'll list some options.
Elections and voting
There are historical examples of leaders being elected. You only need a combat leader when fighting so electing who that combat leader is when you are not fighting is totally practical.
This is typically the case when the crew does not belong to some external organization that decides the positions and provides ready system of ranks. Navies and merchant fleets could let the crews elect the captains, it just doesn't make any sense because the crew does not own the very expensive ship and the actual owner already has a ready system for deciding the leaders with qualification checks and training and other useful extras.
But mercenary groups, pirates, free traders and other such groups where the crew is also the owners of the ship and shares the profits and where they are separate from external organization that would give them a hierarchy would probably elect their leaders and vote on non-urgent decisions.
Even if there is a League of Free Traders or Mercenary Alliance or a Pirate King they would let individual crews make such decision autonomously. Realistically they would want to enforce some system of ranks or qualifications that would control who can be elected to which position and who needs more training or practical experience.
Such crews would also as mentioned discuss and vote on non-urgent decisions. I am repeating this since it is important to understand that many decisions can indeed be discussed and voted on. It just takes time, so you must be clear on which decisions cannot afford the delay.
Hive minds or crews with cybernetic mind-to-mind links would of course be able to do real time democracy. At least for simple cases.
Parallel hierarchy
If decisions can be cleanly separated there is no need for the positions for making those decisions be in the same hierarchy. You can have a combat captain with combat hierarchy and a sailing master with his own hierarchy and most people, including both of the leaders would belong to both. Pirates kind of did this because there was no reason why the best battle leader would be the best sailor.
Military ships might have people who are civilians or from other branches of service. In anything short of emergency they'd operate fairly independently and their responsibilities in emergency might be mostly predetermined with the captain not really deciding it case by case.
There is really no limit how many such parallel hierarchies there might be. A theocracy might have priests on all its ships who are not subject to most orders from the captain. A dictatorship might have political commissars and security forces on board who would specifically not want to look like they are even too friendly with the captain. A science vessel might have scientists operating fairly independently. Logistics might be fairly independent organization. The ship might carry marines or other troops from a separate branch. Free traders might have a separate person for commercial negotiations. Or handling interactions with authorities. Mercenaries might have a face person.
Humans would not go too far with this since we find such things confusing and confusion makes everything slower and less reliable. But an alien species or humans with cybernetic enhancements might have no such issue. A religious group might insist on the confusion as a valuable spiritual exercise.
AI or remote decisions
The position of making specific decisions might be assigned to an AI or someone not on the ship. Or an AI that is not on the ship.
This is already happening naturally with ships owned or controlled by larger organizations. Why should decisions about larger concerns be done independently by each ship? Why should decisions about what to do in port be done by a person on the ship when the company has employees in the port? Why should decisions about rare technical or medical issues be done on ship when an expert is available via a satellite link?
Similarly lots of routine decisions could be handled by AI. If the rules of what to do in a situation are clear enough a computer system can apply the rules much faster and more reliably than a human can. The first very simple example of this was probably automated AA systems, computers can interpret data from sensors and control weapon systems much faster than humans possibly could.
But with increased power of computers, global communications, machine learning and systems capable of accepting speech input and responding verbally many routine decisions could be handled by computers with remote access as backup for less clear cases. And a token human or two who knows how to shut everything down safely if things go really wrong.