Best Way To Locate Offending WP Table

It’s unusual to include/require files based on database values, but if that’s what’s happening — one way to track it down would be to export the DB from production to an SQL file (which maybe you already have), then search through it with a text editor. You should then be able to look at the INSERT statement (I think it is) and see what table it is being added to.

If I may suggest — rather than exclude tables, you may want to run a command after import to the local site that searches and replaces the old string in all the tables. At a previous employer, we used Search Replace DB to get the job done. It took a while, but worked very well.