Motor protection and management system