So going back to the original post.
Reason why units are so squishy in vanilla is due to all of them being like that as combat is very fast, phalanx units can destroy eachother in 30 seconds and overall pikes have fastest kill ratio while lowest defence. Which is opposite of how phalanx works.
In DeI we aim for longer combat. If phalanx units, that are sturdy but slow to kill, would rout after a single rear charge, you would win every single battle against them with just 1 unit of cavalry.
Other case is that in the end most of troops in phalanx are not some low on income beggers, even when attacked from the back or side they would still put up some resistance, even at Pydna phalanx put up some resistance in close combat after being attacked from nearly all sides, before rout began.
This is especially true for more elite units, which can be summed up by below video:
Now in terms of DeI and Rome 2 there are of course some game engine limitations like phalanx units not being affected by terrain, phalanx attack at range ignoring melee defence of targets or weird pivoting.
Like I said above, phalanx units do get penalties from being attacked in the rear and die faster that way. Sometimes when rear charged game decides to spin phalanx around so unit that attacked them in the rear is now facing their front but there is nothing we can do about it.
I just did a quick test, two one of the weakest melee units vs one elite hoplite unit. Only order given were frontal charge by one unit and rear charge by other unit, then fast forward until hoplites routed. As screen shows, units that attacked in the rear killed nearly twice as many troops and suffered minimal casualties. If I would try to pull same trick with for example two hastati or principes that have ranged attacks and better stats, result would have been even more one sided. I can't imagine nerfing phalanx even more at this point as it would mean we are back to 3-5 minute battles.