My son had already been through the divorce wringer when his friend faced it. Before any legal proceedings he had his friend sign over his pick-up to him and “sell” him anything that was worth anything and then when the divorce was over he gave it all back.
I’d imagine a good opposing divorce attorney could convince a judge to look askance at such maneuvers, so it would be a very good idea to make certain that the transaction(s) could in no way appear irregular.