This study proposes a two-stage optimization approach for expressway sensor deployment to improve traffic state estimation accuracy and incident detection capability, while explicitly accounting for error effects through the introduction of chance constraints to represent uncertainty. In the first stage, an initial sensor deployment scheme is designed with the objective of maximizing service level estimation accuracy. In the second stage, three traffic incident detection models are integrated, and additional sensors are deployed to improve detection rates. Genetic algorithms are employed in both stages to solve the optimization problems. A case study based on the FOSIM simulation platform is conducted on an expressway in Guangxi Province, with four experimental scenarios under varying error levels to evaluate the performance of the proposed method. Results show that in the first stage, service level estimation accuracy improves with increased sensor quantity in the error-free group, while it exhibits a rise-then-fall trend in error-influenced groups, with larger errors leading to lower accuracy. In the second stage, detection rates decline significantly under intensified error conditions. Error-influenced groups demonstrate greater improvements after sensor addition, whereas the error-free group exhibits a higher performance ceiling, indicating differentiated response mechanisms under varying error conditions. Error levels have a significant impact on evaluation metrics in both stages. Although service level accuracy slightly decreases after sensor addition, it remains at a satisfactory level overall, validating the effectiveness of the proposed two-stage approach.