Create 4 bookmark list in geocaching.com
Select your GPX, show it at screen as list show all on one screen (you may select in bottom of screen up to 5000 caches shown or by 1000, because next step is easier with 1000)
select 1st page (or reduce to the not found), export to a one of the bookmark lists (1000 max in each) predefined. loop for as many different bookmark list as needed
Create your new GPX, import from Bookmark lists