A Panamax can carry ~5000 containers. 5000! (5000 factorial) is a BIG number. Bear in mind that 60! is more than the number of atoms in the observable universe. Combinatorial problems are hard.
To be fair, a completely optimal solution definitely seems out of reach, but I'm not interested in those.
Just imagine the contingency planning due to restrictions in unloading.
There are also a lot more constraints than weight and balance and they're constantly changing; some may rule out big chunks of the state space which is very good, but it's still a Hard Problem.
But it's not like there aren't people already doing it.