Cyber-Physical Systems (CPSs) offer significant potential to address the evolving demands of industrial development. In the Industry 4.0 era, a framework integrating sensing, data exchange, numerical analysis, and real-time feedback is essential for meeting modern industrial needs. However, implementing this integration presents challenges across multiple domains, particularly in digital analysis, information sensing, and data exchange during corporate transformation. Companies yet to undergo transformation face distinct challenges, including the risks and trial-and-error costs of adopting new technologies. This study focuses on a heavy-duty workpiece processing factory, with a specific emphasis on the painting process. The complexity of this process frequently results in congestion, which is approached as a multi-objective, multi-constraint optimization problem. This paper proposes the Improved Non-dominated Sorting Genetic Algorithm II (INSGA-II) to address the requirements of multi-objective optimization. The proposed approach uses multi-chromosome structures, listeners, and recursive backtracking initialization to optimize the search for solutions under constraints. This enables the factory to automatically streamline production lines based on workpiece processing sequences, leading to increased efficiency. Additionally, a CPS framework focused on simulation modeling has been designed. First, the INSGA-II algorithm processes order data to generate production schedules. Next, the data transmission formats and input-output interfaces are designed. Then, a simulation model is built using the algorithm’s results. These components collectively form the CPS framework for this study. The proposed method offers an automated digital solution through the algorithm, enabling verification of its feasibility via the simulation model. As a result, it significantly enhances decision-making speed, reliability, and equipment utilization.