Real-Time Robot Pose Estimation for Industry 4.0: Enhancing Motion Validation and Monitoring with a Vision-Based Framework