You will eventually regret any use of Euler angles. - John Carmack
However, you will never entirely avoid them because they are just too practical. Under careful constraints, they make code interfaces simpler.
This is especially important if you are to expose that code to a multidisciplinary team. There is no way you're going to teach an artist how quaternions work just so they can rotate their stuff around the up axis, when simple yaw-pitch angles cover 99% of their use cases.