It definitely sounds like some mental health issues enter the relationship, which is never easy whether on both sides or only one.
I have a dBPD who spent a couple years narrowly avoiding jailtime, and I ran ragged trying to save them from themselves; I had promised them I wouldn't let them end up in jail, and then I took that promise to a ridiculous length to honor it even while it hurt me, and worse, hurt the children who were involved.
If he has mental health issues then he may not be BPD specifically, ASPD looks very similar as does Haltlose, and based on the snippets of detail you've provided it could just as easily be something else like complex PTSD, Aspergers or ADHD comorbid with schizoaffective, etc.
Keep in mind "facing five years" usually means more like "sentenced to 18 months" and in practical terms means "released on good behavior in a year"...and with Covid it sounds like they're often doing it even faster. So don't hang too much dread on the number "five years"; if it's just possession of a firearm (in a state where he could otherwise own them if not a felon) and violation of his order I expect he'd do less than a year.
Even if he doesn't reach out for a relationship with your daughter, keep in mind that you should encourage some such relationship even if it's just literally going to the jail once a month to let her chat through glass or something. Girls without father figures often end up in very precarious circumstances - and everybody hopes their own children will be healthier and better than they themselves were
I'm guessing a lot will probably end up hinging on whether or not his current partner stands by him during his troubles or not; it might be wise for you to sit down and figure out what the 3-4 possibilities outside your control are going to be over the next four months...then agonize over drawing up a plan for each of those options...so when the time comes, you know you've put months of rational thinking into the decision, rather than making it on a whim when you get hit with the news.
edit: Harri, can we change the smiley face on here? Most sites have a pleasant, serene smile...ours has somebody grinning ear to ear...which is offputting and not really the smiley I'm trying to convey when I say "I'm sorry to hear your sister died, but trust me it gets easier with time, I'll pray for you

"