To foster the utilization of regeneration braking energy and suppress voltage unbalance (VU), a railway electrical smart grid (RESG), intergraded with power flow controller (PFC) and energy storage (ES), is proposed as an important part of next-generation electrified railways. However, under the uncertain traction load, how to design the optimal size of PFC-ES is a challenge during the planning period. Hence, this paper proposes a chance-constrained two-stage programming approach. The first-stage aims to minimising the overall cost of RESG's devices. The second-stage aims to arrange the energy flow of the PFC-ES with the objective of minimising the expected operation cost under the dynamic VU restriction, and the stochastics characteristics of traction load are transformed into a chance constraint by using a scenario approach. Then, traction power predictions are combined with multivariate Gaussian Mixture Model (multi-GMM) model to generate correlated traction power flow scenarios and to assess VU probabilistic metrics distribution with different confidence levels. Finally, a novel algorithm is designed to select the confidence level and violation probability so that the capacity planning results can ensure the high-efficient and high-quality operation of the RESG. Case studies based on an actual electrified railway demonstrate that the proposed PFC-ES sizing approach can reduce the overall cost by up to 13%.