Regarding just the fact that his lies are jeopardizing her job -- she absolutely must protect her job because if she loses it, she also gravely jeopardizes her ability to keep custody of her child. If she gets fired, the ex will tell the court that she is no longer able to support her child adequately and he will try to take their daughter.
She must be proactive and not wait for her employer to find out what's going on -- she must tell her employer, herself, now, but she does not need to go into gory details.
She needs to go to human resources and have a scheduled, formal, sit-down meeting (not some casual chat in the hallway on the run) and tell HR: "I need to give you a heads-up that my ex husband and I are in a very contentious custody fight and he is fabricating things about me in order to try to get custody of our child. He says he will attempt to undermine my job here by coming to the company with lies about me because he would like to see me lose my job which would help him gain custody. I wanted the company to know, not because I want you involved in our private dispute, but because I want to be on the record with HR that he may try to make claims against me. If he comes to the company I need to be notified so I can let my attorney know immediately."
If HR asks what he might say, she does not need to get detailed. She can say that she isn't sure but knows that he has threatened to go to her employer and try to get her fired, and she wants to be a responsible employee and warn her bosses and HR that this is about a private dispute and not about work.
She also does need a new attorney immediately! The fact her last one was a loser does not mean they all are losers. She cannot navigate this alone, especially if he tries to tell lies that get her fired. She needs a strong attorney who will threaten her ex with a slander charge if he approaches her employers with lies. Yes, it would be slander!
I am sorry she's going through this. Her daughter is old enough to know how nasty the dispute is, unfortunately -- small children can be kept pretty oblivious of the details but at 10, the girl likely is aware of how nasty this all is. Mom needs to be sure never, ever to badmouth dad (as much as mom has reason to do so!) and as this goes through the court, mom should demand a clause in their agreement that neither parents can badmouth the other in front of their child - there ARE such clauses in custody agreements and they are enforceable so that if dad later trash-talks about mom to the child, mom can haul him to court.
But meanwhile, she must get an attorney ASAP and also go in and, coolly, calmly and professionally, put her employer on notice that her ex is threatening to try to undermine her employability. That way she gets the first word in, and if she is a good employee and they are decent bosses, they are going to believe her and not him.