For zero coordinates there's a filter. Have you checked the documentation?
in https://www.traccar.org/configuration-file/
filter.zero config
Filter zero coordinates. Zero latitude and longitude are theoretically valid values, but it practice it usually indicates invalid GPS data.
Longitude and Latitude 0 How can I make an adjustment that allows Tracar to eliminate, discard or ignore longitudes and latitudes 0. In addition, could I create a filter that allows me to only store the locations of my country?