How to alter WP-JSON main query or best practise for custom endpoints

You are doing the right thing. In theory you can probably intercept the “normal” API request and modify the relevant wp_query to whatever you need, but this will mean that you are changing and overriding that API and if you will need it in its “virgin” form at some point it will not be available.

As for pagination, it is true that you need to make your own, but it is actually much easier to do that than on the HTML front end, all you need is to keep the page number in your JS handling routine and send the requested page as part of the request.