Not worth it, i have an inexpensive and simple carpet
If you can toss and replace it do that.
If not try searching for an enzyme cleaner.
They break down organic compounds and get rid of them with amazing efficiency by digesting them.
My long dead cat once did a really nasty and thick huge diarrhea lump of shit in my bedroom closet on the carpeting against the wall back there.
Pretty sure to prepare the area I picked up as much of it I could with paper towels but it was still badly smeared in there and embedded looking like it and the stain would never come out.
Wrong!
Turns out my mother had an enzyme foam cleaner in a yellow spray bottle so I followed the instructions and tried that.
I think I wet down the area lightly first with a little pinch of water to rehydrate the diarrhea as nasty as that sounds then I covered the area in the foam enzyme and I believe covered and pressed it down into the muck and mire with a wide plastic bag and possibly a heavy book. Not sure if I used a fresh paper towel or not first to press the concoction down before placing the bag but probably.
Well about 10-20 possibly even thirty minutes later I went to check it and the shit was all gone as was the white foam leaving only a very mild light damp spot with what appeared to be fluffy invigorated carpeting.
Pretty sure I even tested it to make sure my eyes weren’t deceiving me by pressing a fresh paper towel into the spot and wiping it around looking for shit spotting but nothing.
To this day I am amazed at how thoroughly and efficiently it cleaned the area by essentially digesting the shit.
A cleanser like that is probably what you need as the baking soda can only absorb smells but doesn’t remove a still present organic source.