To avoid recreating the cache, maybe have the fontconfig lib check and return the changed `FC_FILE` value?
That would seem to be a better place for the fix.
Either that, or flatpak should copy the font cache and modify its contents to fix up the paths or something.