The lawyer is first and foremost an officer of the court.
The lawyers job, in an investigative process, is to advise his client. Of course, if the client admist guilt then the lawyer is obliged to advise a guilty plea, with mitigation.
But here it is rather different. THe PJ were under an obligation to set out the evidence they had against the McCanns. (one of the features of the investigative process). *
The problem is that PJ lied about that evidence, suggesting that they had definitive forensic evidence which could lead to charge of murder. It seems led to their lawyer suggesting accepting a lower tariff (2 years) for a confession of accidental death, to avoid the risk of a much more serious charge.
Fortunately, the McCanns were both sufficiently self assured to ignore that advice.
If this is correct, then some parts of the PJ, and Amaral in particular, should hang their heads in shame.
__________
* under the adversarial process (eg UK law) it is permissable for the authorities to use some deception in the conduct of the case, because there are checks and balances in place, and legal representation to protect the suspect. Under the invesitagive process (eg Portugal, France), the idea is that both sides (police and suspect) work together to discover the truth under the direction of the court. This provides the suspect with less direct protection, but also places additional responsibilities on the police to be more candid about the evidence they have discovered.