I think you nailed it. If one completely rejects Church teaching, but still goes through the motions of pretending to be Catholic, they might be saved. Devout Catholics are damned.
I don’t say that and I don’t believe that.
Of course if someone felt that Devout meant inordinate devotion and adoration of Mary and similar junk, then I’d wonder how they really were and how much they really put God first.
But that would still be something between them and God and something I could at most make guesses about—and virtually all of those would be hazardous judgment on my part—depending.