The first hadeeth regarding deficiency in intelligence and religion has a sound isnaad (chain of narration) and is classed sahih, as it is narrated by Saeed al Khudri (RA) in Bukhari.
The prophet (SAW) here is discussing the shortage of deen, as oppose to the way you have interpreted or translated it, because of the menstruation and menses etc. With reference to the lack of intelligence, he does not say that the potential or talent or capacity is less. The sisters have many important duties, even more so than men who only have the fundamental task of providing for the family. The sisters however, have to endure pregnancies, being a wife, and ensuring a sound upbringing of the child. Allah is merciful, he forgives her and makes it easy for her when she is not fully responsible to give a full testimony as a witness. Nothing of that is defaming a woman, there is not a law that discriminates a woman to put her down.
It is also important to point out that the assumption that 2 witnesses are required for every case is wrong. The Quran states regarding FINANCIAL transactions:
"Oh! ye who believe! When ye deal with each other, in transactions involving future obligation
in a fixed period of time reduce them to writing and get two witnesses out of your own men and if there are not two men, then a man and two women, such as ye choose, for witnesses so that if one of them errs the other can remind her." [Al-Qur’an 2:282]
it is advised to make an agreement in writing between the parties and take two witnesses, preferably both of which should be men only. In case you cannot find two men, then one man and two women would suffice.
It is like one who is to undergo surgery, it is advisable to refer to two medical opinions rather than one. Where they cannot find 2 doctors, the person would seek advise from 1 doctor and 2 general practitioners.
Some scholars also state that in cases of murder, 2 female witnesses are equal to 1 male witness, due to the emotional state that a woman has compared to a man. Woman has been created (medically) more emotionally attuned for care and nurturing over the man. This is why they have the most important job in islam of raising the islamic nation (through the child).
All other cases however, show that 1 female witness is equal to 1 male witness.
And Allah knows best