Sorry, but it is really easy... just do the right and honest thing. Yes, that means telling your interviewer that the job does not fit, or that you really don’t want that type of job... You are one of those that I would not have hired because of your attitude... and probably dishonest about it at that...
Have done so in the past and even in retirement continue to try to be as honest as I can...
Yes, ‘right thing’ and ‘honest thing’ are all fine and good, but you haven’t yet provided a scenario where doing either is completely independent of the Golden Rule.
You mentioned the point about the job interview. Even there, you choose to refuse to take up the job after having realised that you’d be a misfit, BECAUSE you are either afraid your incompetence will be found out, and get punished, or because you might cause serious damage to the company and its people, by making a mistake, both of which are completely governed by the Golden Rule even if you do not wish to acknowledge the same.