Sounds to me like a classic case of Mycoplasma to me. All rats carry this bacteria, and under times of stress or improper husbandry it flares up. It can also flare up after the rat becomes chilled or sometimes for no apparent reason at all. The bacterium attack the lungs, causing severe respiratory distress, if treated with strong and specific antibiotics the rat will recover although it will always be more susceptible to recurrence.
It is a pity your vets did not see this for what it was instantly. If they have any rodent experience at all, they should have suspected Mycoplasma right away, because it is such a common problem. I am so very sorry you had to loose your baby in this painful way, especially since he didn't need to die.
If you do decide to keep another pet, ventilation is key. Make sure his cage is kept clean and has good air flow. A lot of people use aquariums, and you should know they are much more difficult to keep good air flow in. Using a wire lid will help, but of course there is always risk of a chew out. If any other rat shows similar symptoms, demand the vet treat for Mycoplasma. If they are worth anything, they'll know exactly what that is and how best to treat it. If they just hand you Baytril and say he'll be fine, look for a different vet. There are very specific drugs to treat Mycoplasma, and they do a much better job than an "all purpose" antibiotic like Baytril.
I wish you all the best.
Gale