I think this can work very good at scale. Create a well designed REST or GraphQL API, depending on use case. Then use this API inside the Next.JS API routes. Obviously, if you stick your business logic into the API routes this will become a mess if you plan to add other API consumers. On the other hand, if you never want to add other clients to an API, this could be less of an issue.