It depends. Mediation makes sense if the parties are capable of discussing things as equals and are in the position to find a fair solution together. However, if the roles in the relationship are such that one person has more power, then this is often reflected in the divorce agreement.
This is why I personally prefer a joint consultation with a lawyer. When I make appointments like this, I regularly influence the discussion and guide the conversation, in which I explain, for example, how a court would likely rule on a specific situation. Generally, the parties are happy to receive this information. After all, parties often fret over whether they could achieve more in court.
Solutions agreed upon by both partners are the most sustainable. However, if I notice that the differences have hardened, I break off the conversation. In such situations it is often more efficient and remedial for formal divorce proceedings to take place as quickly as possible. While I cannot personally comprehend parents letting a third person make decisions about their children, for example, in difficult circumstances it often helps when a judge hands down a ruling and says that this is the way things must be. After all, this opens up the path to an agreement.