Actually things CAN be ok even after court.
I went to court in the 90s with my now-ex, over child custody.
It was SO nasty I honestly thought someone was going to end up hurt or mentally ill or something.
Not only did we get past it eventually but we went onto have another child.
Ultimately...