Container terminals are complex systems where containerized cargo undergoes a set of processing and handling operations to be delivered to their outgoing modes. A pool of decision support methods and simulation models has been developed to assist planners and managers in making decisions about daily operations. Nevertheless, most are designed for a particular terminal and not generic types. Indeed, a generic model serves as a conceptual factory to create specific models which greatly reduces the time and efforts of development; however, building such a model is no mean feat. To this aim, the paper on hand discusses the complexity of applying genericity, flexibility, and modularity in system modeling and proposes a generic architecture to build modular and flexible simulation models for container terminals. This architecture is split into a set of smaller, manageable, well-connected, and generic modules that facilitate the creation of highly parametrized specific models. An illustrative example of the architecture usage is presented in a case study, the new container terminal of Stockholm, and the resulting models were validated by subject matter experts. Finally, to prove its efficiency, a numerical study fed with real data is conducted to investigate the handling capacity of the studied system under different handling and flow scenarios. The obtained results show that the terminal handling capacity can be increased by around 50% if three to four more straddle carriers are added to the existing fleet.