It's doable for a competitor. AIS has the vessels depth. If you assume the weight of a container to be similar you can monitor the vessels depth as they discharge and then load containers. You'll have to account for bunkering, empty containers, etc. Still, it's doable.
There's also some data (not sure if public, should be easy for any shipping company) for anything going to the US. You can use that data to further improve the previous estimates. See https://www.joc.com/regulation-policy/trade-data/united-stat.... Interestingly the JOC is terrible at predicting future trends despite having one of the most detailed data on their trade.
Note: the method above will not give you exact numbers. It's not actually needed to know the exact numbers, seeing the trends and the fluctuations/changes is already quite useful.
But I’m guessing that adjusting for bunkering is tricky since they might fuel up more in ports where fuel is cheaper, so you cannot assume they will be nearly empty close to every port they call. Would love to know if guessing based on this is actually being used though.
Conclusion was that yes, you can predict locations of the terminals, but it's quite hard to find and produce repetitive schedules from the data because it requires the ships not change their schedule for too long, and the reality is just too dynamic to properly predict this.
For seagoing vessels I expect that they have more predictable schedules, but the hard part there is knowing container volumes, because there is no way to predict from public data what the volume of containers loaded/discharged is at a specific terminal. The closest metric is measuring the turnaround time of the ship, but that is not a great predictor for number of containers moved because handling times per container will differ per port, as will the number of cranes assigned to the ship, as will the ratio between 20ft and 40ft boxes, as well as the capability per port to do twinning (picking up 2x20ft boxes in one handling) and dual-cycling (discharging and loading a container as part of the same crane cycle).
Basically: it's a tough problem, with too many variables you cannot reasonably deduce.
(Also, even if you have the container volumes, I personally think the highest potential for optimization is in the hinterland, but that's a different story altogether)