For anyone still looking for this, since this is the top result I will post some more research:
Flatten Tracks has nothing to do with the ability of the engine to recognize materials. The crucial part is to export Face Sets from you software of choice.
Then, you can either tell Unreal to look for materials (nomenclature will be important, otherwise it won’t find them), or to create new materials for each Face Set.
Flatten Track will simply determine whether you want to keep submeshes or let unreal bake all the vertex information into a single mesh. It worked for you because, if you do not export Face Sets, then Unreal does not have any information of what to do and where, and letting it keep submeshes includes information on those specific submeshes materials. Still no information on materials applied on specific faces.
When the “remeshing” is done (Flatten Tracks), having Face Sets lets Unreal know what material goes to which face, and thus keeps it consistent.
Hope it helps.