Hi Your explanation seems OK to me. And, I would like add that gerund is also an object of the preposition, and going by that it is a gerund phrase, object of the preposition 'to'
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.