The senior officer targeted a junior on his team with sexually inappropriate messages, a South Wales Police misconduct hearing heard