I quote from the Business Halacha Institute:
An elderly gentleman spends the final years of his life in a nursing home. In his will, which was drafted shortly before his death, he left a significant bequest to a member of the staff that cared for him during his final days. His family was, naturally quite upset, and suspected that the staff member had abused their position of power and influence over the increasingly feeble patient. What are the Halachic factors involved in asserting claims of undue influence?
What emerges is that undue influence is a very weak halachic argument. In contrast, there are very significant legal protections concerning undue influence, and it is a very prominent aspect of many will contests. The reason for this disparity of treatment arises from the very basis of choshen mishpat versus civil law. Civil law incorporates values- to the extent that it seems unfair to allow a person with a position of power to wield that power for their personal benefit over those that are helpless to resist, civil law creates limits and protections to prevent such scenarios. In contrast, Choshen Mishpat focuses on strict rights and obligations, without incorporating outside factors and considerations. While there is certainly a concept of acting Lifnim Meshuras Hadin that requires us to act in a fair and equitable manner, the actual halachos that define people’s rights are narrowly constructed. The parties, and to a limited extent Bais Din, should add these yashrus considerations to their behaviors, but the fundamental rights and obligations are generally unchanged by the ethical considerations. (emphasis mine)
I could not put it better myself (which is why I quoted them).