Jennifer Newstead knew she faced a formidable task when she took over as chief legal officer of Meta Platforms four years ago.