Background: Real-time ergonomic risk assessment in manufacturing environments is challenged by severe class imbalance in high-risk postures and the need for deployment-efficient models. Conventional oversampling techniques may violate biomechanical constraints, limiting their suitability for human motion data. Objectives: This study aimed to compare multiple machine learning models for real-time ergonomic risk assessment while addressing data imbalance using biomechanically appropriate learning strategies and evaluating both predictive performance and deployment efficiency. Design: Comparative study. Methods: A large-scale workplace safety dataset comprising image-based skeletal keypoints was analyzed. To mitigate class imbalance without generating biomechanically implausible samples, cost-sensitive learning and focal loss were employed instead of synthetic oversampling. Subject-wise data splitting was applied to prevent data leakage. Five model families, including Random Forest, convolutional neural networks, and a lightweight graphbased network, were evaluated using accuracy, F1-score, area under the receiver operating characteristic curve (AUC), and high-risk recall. Statistical significance was assessed using bootstrap confidence intervals and McNemar and DeLong tests. Results: The lightweight graph-based model demonstrated competitive classification performance while maintaining reduced computational complexity. Although none of the models achieved the predefined high-risk recall threshold, statistically significant performance differences were observed across model families. Conclusion: The findings suggest that biomechanically informed imbalance handling improves methodological validity in ergonomic risk assessment. While deployment feasibility appears promising, further empirical validation on edge hardware is required.