While a variety of smart or dumb machines are used today to assist lawyers, unless you are talking about Sci-Fi level AI, I can't see lawyers being replaced by AI. Okay, maybe a number of lawyers whose jobs are mostly secretarial in nature may be replaced by smarter tools, but not lawyers who counsel or advocate for clients.
It would only work in some kind of Sci-Fi dystopia where the legal system would be unrecognizable to those used to an adversarial based common law system, or the like.
We've seen that for a number of difficult problems, deep neural networks, given sufficient data and expert trainers, do a good job most of the time and occasionally come to mortifyingly wrong conclusions.
Run a 'sed s/mortifying/mortal/' on that previous sentence and think about it for a minute.
Humans also subvert things in order to make more money.
Maybe not complete replacement, but where AI does most of the thinking, shows "This is what I found, and this is what I used, to decide this." and humans have the final approval on whether to go ahead with whatever it decided.
If someone has a disagreement, it would be submitted to the AI and make it re-evaluate everything while weighing it against the disagreement.
I would make my tiebreaker another human, though.
If the AI system showed the reasoning behind its choice, that would help a lot with assuaging my fears. I was thinking of the current state of neural networks, where there's no way to see how it drew its conclusions.
Lawyers are different. Their subject matter is the interaction between human beings. A lawyer, for instance, must persuade a judge or jury or, in the transactional setting, the opposing party. So long as humans are governed by humans, there will be a role for lawyers.
Of course, every rule or law would have to be initialized by humans in the first place.
Simplified example: "Murder is bad.", but after the AI observes enough cases where the victim attacked the killer first, it may present "But not when in self-defense." as an amendment, along with its reasoning, which again would have to be democratically approved by humans for it become a default condition.
It could even retroactively apply such new rules to all past cases, better than a human-run system, fixing wrongful convictions etc.