I'd still replace the carpet.

My 15 year old Chihuahua started peeing all the time in her bed, so I took her to the Vet. last week for a blood test. She has a urinary track infection so is on meds for two weeks then I take another urin sample in to see if she has an underlying problem. She has lost so much weight that she now looks emaciated and her hair that use to look and feel like a bunny, is now very coarse and thin. She looks just terrible poor ol gal. So I know what your going thru. When we go visit our sons in Morgan Hill and San Francisco, she stays in her little crate. Of course she has no eyes, so she stays in bed all the time, but I do put her out every hour for exercise and potty. She also has to get a bath each morning from peeing and laying in it. It's all so sad when they get like this isn't it. I'm sorry if I made you feel bad. I do come across a bit harsh but not meaning to.