I'm with the others, lift up the carpet and try to clean/seal the area.
If this were my cat that's what I'd do and then put the litter box in that exact spot.
Your original question is unanswered though and I'm curious as to what other members think.
If that spot is cleaned again, and a litter box is placed over it, and there is still a hint of smell under the box from the old cat, will the new cat use it?
My guess would be yes (for most cats). Do other members agree?