Sorting plants are crucial for effective recycling, but their optimization can be challenging due to the heterogeneity of waste streams. We introduce a novel approach to holistically optimize sorting plants using digital twins containing data-driven process models. To demonstrate their technical feasibility, we developed a data-driven process model for industrial-scale sensor-based sorting (SBS) units by combining near-infrared process monitoring with machine learning. Our results indicate a sorting performance change (F1-score) in the SBS unit by -0.22 a% for +1% occupation density and +0.19 a% for +1 wt% target material share. An artificial neural network predicted the SBS behavior with a 3.0% mean absolute error. Our case study demonstrates the potential of data-driven process models for digital twins by clarifying the influence of throughput fluctuations on SBS performance and simulating different SBS cascade designs, thus paving the way towards improved design and operation of sorting plants and a more circular future.