A trick I use is to be sure to place each ID material to one of the proxy triangles. This way it is seen as used and will not purge and it also stays along with the component.
Beware that purge plugins will also purge materials that are used as part of a 2-sided material. Chaos recommends using the purge material feature inside the material editor.