@nextcloud #PhoneTrack is great. I have been using it as described, on my server, for more than a year. It took me some time to quite understand how the various settings influence the granularity of the tracking, but I have arrived at a setup that is pretty much what the tracker on Google Maps can do--but without Google involved. Sharing with others (on the same server) also works well. Replacing the PhoneTrack Android app is also quite possible if desired. I have arrived on a mostly-working self-written app for this, feeding into the
#Nextcloud backend.