It may not truly be helpful, but I have to say this is not a place to skimp. If he has a job, he should put everything he can into his representation.
We had a close friend in Colorado get charged by an over-reaching prosecutor. They were employed but broke, so would have to use a public defender. A little research on finding this out showed, at best, a 60% chance of success with them. (I don't fault them; it is a matter of funding / workload, not talent of individuals) the charges were such that, if convicted, he was definitely losing his kids. He was married, and it was ugly to think of how they would live after that.
I literally couldn't sleep that night, thinking through the situation. So, we sprang for a good lawyer. Long story short, found not guilty.
The family went through much drama after that--they seem to be drama magnets, although they are a loving family. Listened, and never intervened further. (To be clear, he also never asked for help; even that time. Not in his nature to ask for handouts. An important boundary, and honestly surprising given everything) But through all that, kids are great, unique, and mentally healthy young adults. Mission accomplished.
I'm not offering to spring for your friend, or suggesting you should. But I would tell him together the best help he can: experienced with family law; good track record / references / referrals; "clicks" with him--they get along, listen, explain well. Nothing is guaranteed in law, so he needs to at least feel he did everything he could and got a fair shake.
I can't think of a single thing I wouldn't give up for my kid. Yes, he needs food and shelter, and now needs enough that will pass a CPS inspection. But everything else should go, if needed. Find more work to fill the time you would just spend uselessly worrying anyway. The good news is legal representation is a one-time, not ongoing cost. So sacrifices made for it can be recovered afterward.