וַיָּ֧שֶׂם אֶת־הַשְּׁפָח֛וֹת וְאֶת־יַלְדֵיהֶ֖ן רִֽאשֹׁנָ֑ה,
וְאֶת־לֵאָ֤ה וִֽילָדֶ֙יהָ֙ אַחֲרֹנִ֔ים,
וְאֶת־רָחֵ֥ל וְאֶת־יוֹסֵ֖ף אַחֲרֹנִֽים׃
putting the maids and their children first, Leah and her children next, and Rachel and Joseph last. (Gen 33)
As Rashi explains "אחרון אחרון חביב", Yaakov ordered his family according to his affection, his maids and their 4 sons were least loved, then Leah and her 6 sons and Rachel and Yossef were loved the most.
In theory, Yaakov could put them all in one wagon, eliminating the discrimination (we all know what it led to some years later), but he thought differently.
How Halachic is this behavior, comparing to the current Halachah? Should we follow this behavior when taking care of our kids in life-threatening situations (ordering them by our affection), or if some of us have more than one wife and kids?