As DaG mentioned in the comments, you can't always replace "che" and "chi" with "il quale" & co.
Your example below:
Le ragazze le quali abbiamo salutato sono francesi?
is incorrect because this subordinate is a relativa restrittiva. It's not simply describing the ragazze: it's specifying that the main clause only refers to the ragazze you greeted. And as explained by the Crusca:
Le due forme non si possono considerare intercambiabili [...]
Quando [...] la proposizione relativa determina il nome a cui si
riferisce distinguendolo in modo univoco da un insieme più ampio di
persone, animali o cose (relativa restrittiva), si può usare solo
che.
There's no corresponding sentence with le quali that I can think of, because salutare + con + qualcuno is incorrect in Italian. The closest that comes to mind is "Le ragazze con le quali ci siamo scambiati i saluti sono francesi" – grammatically correct, but it sounds very convoluted.
I also add that "il quale" etc. are from a very formal (esp. written) register.