Filter the URL of next_posts_link & previous_posts_link

Run a filter on get_pagenum_link and you should be able to do what you want.

The next_posts_link / previous_posts_link functions each call functions that in turn call other functions, which eventually route back to the get_pagenum_link function which provides a filter by the same name.

It should give you the control you need, though post a comment if you specifically need an example.

For the singular post link functions, ie. next_post_link / previous_post_link (note the non-plural other readers) there’s a filter hook with a matching name, eg. next_post_link and previous_post_link..