If I am correct, the quote you offer from the CCC (thank you for that quote) is from the Ignatian Exercises, Point #22.
It has been a mainstay for me for a long time.
Funny you should mention that as St. Ignatius is one of my favorites. I love the Examen Prayer and his teaching regarding the Discernment of Spirits. These things really help us grow in our relationship with God and assist us greatly in overcoming our own sinful tendencies.
Thank you for your kind words. ;-)