This is great advice. The worst interviews (when you are sitting on the interviewer side of the table) are those in which the interviewee is obviously out of their depth and thinks they can snowball you with a made up answer. Uhh, not going to happen. We wrote the questions - I think we know the answers
I am more inclined to hire someone who follows the advice you gave (be honest and explain how you would overcome the knowledge gap) than someone who thinks they know everything about everything.