I finally nailed it! After a simple change and recompiling a package, I could have gps working continuously for over 3 hours, which had never happened previously on my FP5.
The problem was indeed in ubuntu_application_gps_hidl_for_hybris.cpp part of the package libubuntu-platform-hardware-api3 whose repo is at https://gitlab.com/ubports/development/core/platform-api, and lomiri-location-services calls this library to access the android drivers (through hybris). The problem was that the code continued to use a chunk of memory that had been supposedly freed (use-after-free) and the memory corruption only became visible when the allocator reused that freed memory chunk for a new allocation. At that point two pieces of code competed for the same memory, leading to crashing. The issue is more likely to happen quickly when many applications are running, explaining the somewhat random duration before the crash.
On my Xperia X, a different piece of code was used (ubuntu_application_gps_for_hybris.cpp, not ubuntu_application_gps_hidl_for_hybris.cpp) which explains why it never had this problem.
That gps_hidl piece of code has not been touched since 2020 and I believe UBports uses it in all phones running running Android 10+ vendor blobs, meaning that the problem should not be specific to the FP5. Yet, I find it really strange that no one reported the issue previously and that only @WillemHexspoor confirmed it here. Does that mean that UBports users either never use their gps for extended periods (e.g. routing with PureMaps or uNav) or that they only do so under waydroid, or that other phones access the gps through a different scheme (another library)?
I have filed a merge request to that package.