With WP 6.5 coming in a couple of weeks, I’ve made some changes since my comments earlier. The current dev version has been tested on 6.5-RC2-57828 with and without the performant translations plugin.
Despite my comments earlier, it has become clear that WordPress Core will not generate PHP translation files. They are now installed from GlotPress alongside the PO and MO files.
Lazy generation of these files would still require the Performant Translations plugin, so I’ve now added PHP file generation into the Loco Translate compiler.
It seems that no fixes are required for Loco Translate’s file loading helper (which merges custom translations on top of installed ones). Fortunately, this just works as is.
I’ll make a release shortly before WordPress 6.5 is released, in case there are any teething problems. However, if you’re running a WP6.5 preview, then please test the current dev version of Loco Translate.