When you use the Place command. in the browsing dialog window that comes up next, choose your text file, and hold down the Shift key as you click ok. This will bring up the Options dialog, where you will see much possibility for selectively clearing / stripping / sorting out the formatting.
One link references Epub Scripts on epubsecrets.com, which, in turn, has a link to Theunis DeJong's preptext.jsx script and there are some other related scripts there as well.
Maybe i am misunderstanding what you are doing, but it seems if you have identically named, but differently styled paragraph and character styles for your two layouts, you should not need to clear overrides between documents. Header in layout X is 20 pt and blue and in layout Y is 15 pt and purple. When the InCopy file is placed, it will have the attributes as defined in the style for each document.
Point is styles are overrun in the first layout. These overrides are then infecting the second layout.