You wanted an answer with realistic physics, but let's start with the case where there is no friction, all collisions are perfectly elastic, and the cushions are extended to fill in the pockets. You then have something similar to dynamical billiards, which has been studied for a long time. (The difference would be that you have multiple balls. Since there is no friction, I don't think the dynamics of the balls, e.g., moments of inertia, come into play.) This is a Hamiltonian system, so by the Poincaré recurrence theorem there will be infinitely many times when it revisits the racking triangle in the initial configuration to within, say, a precision of 0.1 mm. It won't stay in that configuration, just pass through it. Poincaré recurrence doesn't guarantee that it will visit *other* configurations, such as the permuted ones, but I think it's plausible that all such permutations are equally probable, i.e., that the system's behavior is ergodic in this sense.

Can we arrange for the configuration to be exact? This seems unlikely to me. The flow through phase space is volume-preserving, so for some ensemble of initial conditions with a small phase-space volume $v$, the Poincaré recurrence time goes like $1/v$. If you can control the shot of the cue ball to within a certain precision, then $v$ is a measure of that precision. If infinitely good precision is required, then $v$ approaches zero, in which case the recurrence time approaches infinity.

Of course this argument is only statistical, so it's possible that there is some trick that evades it, e.g., involving some hidden symmetry. If you could shoot the cue ball exactly parallel to the short axis of the table, it would never hit the cue balls, which only solves your problem for the trivial case of the identity permutation. If you could shoot exactly parallel to the long axis, the whole system would have a permanent reflection symmetry in its motion. This would halve the number of dimensions in the phase space, greatly shortening the recurrence time, but it wouldn't affect the no-go argument about $1/v$ given above.

If there's friction, then in addition to the statistical argument above, you have the problem that the flow isn't volume-conserving. A given initial ensemble's volume $v$ in phase space will shrink and eventually become zero when the balls come to rest. The flow only "paints" some tiny fraction of the whole phase space, which is unlikely to include the desired final configuration. Putting the pockets back in makes things even worse.

Thermodynamically, you're asking for a gas to cool down and condense into a crystal. But since there is no attractive interaction between the balls, I think their melting point equals absolute zero, which the third law of thermodynamics prevents you from reaching. If you did introduce some small attraction, and set up the detailed behavior of friction such that balls didn't just end up sticking at one point on the felt, then presumably they would condense into a triangular lattice in the end. With some finite probability the shape of the whole crystal would be a triangle. If you were able to shoot the cue ball with extremely high precision along the long axis of the table, then symmetry would guarantee that the triangle would be centered on the axis and aligned with it. With 50% probability the triangle would point the right direction. By adjusting the speed of the initial shot, you could probably get the triangle to position itself in the right place as well. The trouble is that the angle of the initial shot has to be controlled to within a precision of $10^{-n}$ degrees, where $n$ is large, because the system has a Lyapunov exponent.

I don't think this question can be addressed by brute-force simulations, because the Lyapunov behavior means that the number of initial conditions you'd have to test would be $10^n$, where $n$ is large. If the equations of motion have a closed-form solution for a smaller number of balls, that might give some insight into whether there is some trick or hidden symmetry that evades the $1/v$ argument. But the usual rule of thumb in physics is that two-body problems are easy, but three-body problems are impossible.