The redshift evolution of rest-UV spectroscopic properties to z ∼ 5