Your statements regarding armor and firearms are wholly inaccurate. Armor was effective against firearms for a very, very long time. There was the practice of proofing where armor would be shot and the dent left by the pistol ball would provide evidence of the armor's suitability. Their are plenty of accounts of armor stopping pistol fire. The cuirassier was fielded by the French on the battlefield until 1914, well past the time it was effective, but the use of armor continued for so long because armor was effective against firearms for a very long time and would help keep you alive on a battlefield.
The reason for the reduction in the use of armor is very simple and was the same as the reason it was never entirely universal to begin with. Armor is expensive and heavy. Dismounted soldiers are severely hampered by it and for the cost of armoring them you can just field more of them with more weapons, which the advent of the firearm made even more advantageous. But mounted soldiers, being of higher status and greater cost to train, were routinely armored for the battlefield.
Personal weapons of the light and quick sort were not made for the battlefield. The rapier and small sword were never seriously considered weapons of war. They were sidearms for killing a fool who stepped to you in the street, because being nobility is the same as being a rapper. Got to protect the rep.