First of all, it might be helpful to get a firm grip on what actually goes on with conditionals. Basically, there are two tense systems that we use. The first is the tense system we generally use when using sentences with subordinate clauses that tell us about when something is going to happen. This is to say we use past verb forms to talk about past time, and we use present tenses to talk about present and future time. Within this type of conditional we can see all sorts of verb forms and modals in both clauses.
In the second system we can observe what is sometimes called backshifting of tense. What this means is that in these conditionals we use past tenses to talk about present and future time, and we use past perfect verb forms to talk about past time - even when we would normally expect to just see a past simple or continuous verb form. These backshifted conditionals have a different type of logic that is very difficult to accurately describe. This doesn't matter too much, because most languages have types of conditional which match these meanings very closely. So what you really need to do is enable learners to identify which ones they need. Effectively, backshifted conditionals are hypothetical, in the sense that when we use them we are more interested in discussing the idea at hand than we are directly in the immediate physical world.
When we use normal conditionals, what we are saying is that the situation described in the result clause WILL HAPPEN (or did happen etc), if the situation in the if-clause happens or did happen. When we use backshifted conditionals, we are saying that the situation in the result clause is a LOGICAL RESULT of the situation in the if-clause. However in this instance, it does not matter whether the situation in the if-clause ever happens or not. What we are emphasising is that the result clause is logically connected to the if-clause.
Students understand very quickly whether a given situation is hypothetical or not for them. All you need is a few examples.
However, here is the nasty truth of things. EFL books, and linguists in general know pretty much nothing about conditionals at all. However, we don't really like to say that we know nothing about something, especially if we have to write a reference grammar on it or teach it to students. For this reason, we like to make things up that are flagrantly not true or are only half true. It generally beats having nothing to say. This means that you need to learn what rubbish it is that you are expected to know. After that you need to know how to avoid teaching this at all costs.
The ugly untruth
This is the lie that you need to learn. Firstly, backshifted conditionals are sorted into two types. The second conditional uses the past simple to talk about the present of future. The third conditional is used to talk about past time.
The second conditional indicates that a given situation is UNLIKELY. The third conditional indicates that a given situation is IMPOSSIBLE. [Remember - none of this is true!!!!!]
Different writers use different words to describe this improbability. They use terms like modal remoteness and negative epistemic stance, or they just talk generally about improbability.
So, if you go for an interview to get onto a teacher-training course, what they want you to say is something like:
For the second conditional, I would give my students unlikely situations such as winning the lottery, and get them to make sentences about what they would do if they won.
For the third conditional, I would ask them about regrets they have in their life and how their lives would be different if they hadn't done those things.
In terms of explaining the difference, second conditionals indicate unlikely situations in the present or future and third conditionals indicate impossible situations in the past.
If you can remember that story, you will be able to pass the interview with flying colours.
Why you should never teach anyone this baloney
You may have noticed that you breathe when you sleep. However much you agree with this statement, you are unlikely to agree that you sleep when you breathe. Now we may use second and third conditionals when we think that a situation we're talking about is unlikely or impossible. But this is only because we cannot talk about these situations by describing the world directly. These situations are necessarily hypothetical. However, just because we wish to discuss things in a hypothetical manner does not mean that we think they are unlikely to happen. We often talk hypothetically for other reasons:
It is less direct and intrusive than talking directly about the world - especially if we are making suggestions to someone else or discussing a situation that doesn't directly affect us personally: Well, if you took the position at Kings college you'd be near your friends, and if you took ...
We may not want to bring the discussion round to whether the situation in the if-clause is actually going to happen or not. We may want to keep it hypothetical: So, if we offered you this position, what kind of salary would you be expecting?
- We may want to emphasise the logical connection between the if-clause and the result clause: If he had the measles he would be displaying exactly the symptoms that he is in fact displaying.
Notice that we cannot use a non-backshifted conditional for that last example. If you teach your students that we use backshifted conditionals because they indicate that the event described in the if-clause is unlikely, they will understand that last conditional to be saying exactly the reverse of what it's intending to say. Furthermore, it also means that your students may misunderstand people in interviews for example. Your students may think that the interviewer is not going to offer them the job when they ask about a hypothetical situation in which your student is given the job. Lastly, if your students ever become EFL teachers or write on sites like this one, they will unwittingly lie to all and sundry about the real meaning of backshifted conditionals.
So, in short, you need to learn this so you can parrot it at interviews. You then need to remember never to teach this deleterious piffle to your students.
Colloquially, to a native English speaker, the distinction in most of the sentences you cite is a small one. You would certainly be understood with either usage and most listeners would not even notice a problem. (Though, as commenters have noted, the bigger problem is that you have to say "rather than" in this construction.)
However, the proper grammatical usage is the infinitive construction. Why? Because that's the documented idiomatic construction and not really for any other reason.
Now, you might properly use the -ing construction in the following construction:
It is better to be swimming rather than [to be] running.
In that sentence, you would be using the infinitive of "be" which then requires an -ing form of the verb. (Thus, we are still using the infinitive after "rather than", but we have inserted the verb to be so that we can use the gerund form. The second to be is optional because it is implied already by the first to be.) There is a subtle distinction between the two sentences:
It is better to swim rather than [to] run.
It is better to be swimming rather than [to be] running.
These sentences above are not really interchangeable. The first makes a general point about the two forms of exercise (probably about the health effects), whereas the second sentence seems to comment on the time period during the action (perhaps it feels more pleasant or enjoyable).
Now, in your sentence #5, you should definitely say "to avoid using." Why? Because certain verbs take "to verb" constructions and others take "verb-ing" constructions:
I prefer to use chopsticks. [Correct]
I prefer using chopsticks. [Can be correct in the right context, emphasizing the time during the action.]
*I avoid to use chopsticks. [Incorrect. Avoid doesn't take a to+verb after it.]
Don't confuse the above constructions with:
I breathe to live. [I.e., I breathe in order to live.]
I was born to run. [I.e., I was born in order to run, a poetic way of saying that running is my reason for living.]
I was born running. [I came out of the womb with my legs running (probably a metaphorical use).]
Those are all different meanings and different grammatical constructions, even though they look similar.
Best Answer
'First and foremost' and 'Last but not least' are phrases that are used in addressing a formal speech or a formal text. They are not wrong. The software that you are using probably check clichés of words with similar meanings, because 'first' and 'foremost' are synonyms, same in other case.