Terminology: Gerunds and infinitives are both verbals.
First, if a verb can take a verbal as an "object" or complement, it's going to be an infinitive and has nothing to do with the below. Sometimes the to is omitted.
I want to walk away.
I want to say to him what I think.
The main function of the infinitive is to let you use a verb without predicating anything—that is, separately from making a claim.
For example, in "The cat wishes to sit on the mat", the verb is "wishes", and the sentence claims that the cat is wishing something.
@BenKovitz's answer from your referenced question is very good.
In this sentence:
The cat wishes to sit on the mat
"To sit" is being talked about abstractly here. Whereas in something like this:
Falling asleep was not good for the cat, it got caught by an eagle
"Falling asleep" is not abstract. It's referring to an actual instance of that action being performed.
If you switch to the infinitive, then you are talking about something that might/could/would/wants to happen, not something that was happening or did happen.
To fall asleep was not good for the cat, it would be in danger of getting caught by an eagle. So the cat stayed awake.