Is it an infallible teaching that scrupulous people can "assume it's not sinful" when doubting? + official sources of Church stance on scrupulous?

The Catholic Church offers very good material for scrupulous people: many fathers and videos about it, plenty of discussion. One issue i don't quite understand though is a teaching i've seen repeated sometimes: that, when faced with doubt, the scrupulous can assume the action is not sinful. Well here's where i don't really get it: Paul(don't remember the verse rn) says that you do something in doubt you're acting against your consciousness, so you are sinning. So we got Scripture. So to reverse the teaching when talking about scrupulous people, i assume we gotta be talking about a very complex interpretation or other intelectual works to back it up, or some kind of Church seal of approval. Where does the teaching come from, is it officially recognized by the Church? Also, are there official documents and teachings regarding the scrupulous?