Hi Fac419 and welcome!
It sounds like you are at the end of your tether with your partner's behaviour. It is really hard to know what to do sometimes, particularly with a young child to think of, too.
This is the improving board and 'run messages' are not allowed, so no one will tell you whether you should go or stay. That is ultimately a decision only you can make.
There are ways to improve living with a person with BPD (pwBPD) and these involve learning how to stop conflict from escalating, validating and empathy, learning not to be invalidating, and more. All of these skills are available on this website (on the right side of the page and up the top under "lessons".
They take time to learn and put into practice but they do make a world of difference eventually.
For example, in your situation with the abusive texts when you go to stay with friends, boundaries would be an appropriate solution. There's a good discussion here:
https://bpdfamily.com/message_board/index.php?topic=61684.0I hope your partner follows through on the detox programme. Although this doesn't address the BPD behaviours, he might have the opportunity for counselling, self regulation and other skills that can help, depending on how good the programme is.
However, in the long run, only you can decide how much effort you're prepared to put in to this and whether there is enough hope for you.
We know it's hard... .I wish there was an easy answer