Learning Scenarios for the Improvement of Operating Safety of Machine Tools