The answer is randomness and symmetry, as in the post you linked.
In a container without a lid, air acts much like a lid would have. When air molecules bounce off the walls of the container, molecules in the wall vibrates some, but they are held in place by atomic bonds.
At the open "lid", air molecules from the container bounce off air molecules from outside. These are not held in place, so they can be bounced around. Sometimes the inside and outside molecules both bounce back. Sometimes the inside molecule is traveling faster and both molecules wind up outside. Sometimes the outside molecule is faster and both wind up inside. It balances.
The shape of the container doesn't matter. The idea that the walls are like a smooth mirror and molecules bounce off them like like is an idealization. It is true on average. But on an atomic scale, walls are generally rough with small areas oriented in many directions. And they are made of molecules, not smooth mirror stuff. Air molecules bounce off in all different directions, but they always bounce back.
Bouncing back means there is an outward force perpendicular to the wall. Sometimes bouncing in a mirror like direction, sometimes steeper, sometimes flatter means on average there is no force parallel to the wall.
Microscopically the wall has many orientations, but on a larger scale the orientations average to the orientation you see. And the microscopic outward forces average to an outward force perpendicular to the orientation you see.
The whole point of statistical mechanics is that keeping track of all the details makes the problem too complicated to work with. So people found ways to work with average values and ignore the details. Sometimes all the things that get ignored are not obvious. Good job thinking about it.