Your rule is not stated correctly. When "to" is the particle that introduces an infinitive, the base form of the verb is always used. But "to" can also be a preposition. In that case, the rule does not apply.
In your first sentence, "boosting" is a gerund (noun) that is the object of the preposition "to".
In your second sentence, "deepening" is also a gerund which acts as the object of the preposition.
Student or Learner