Earlier quoted context omitted.
Well, realistically, rails is a bad choice for a json rest api. As for everything else you said, it is doing that as far as i'm aware. Webpacker it's a thing.
Is it? It has an api mode and I’ve used it extensively for that at multiple workplaces and projects.
Presuming you wanted to stay in Ruby for the API and wanted to stay in a project similar to Rails (so, preserving ActiveRecord), Roda + ActiveRecord gets you there with already much higher performance.
If you think about it, a JSON API needs very little. Rails has a lot of added complexity for just rendering JSON. Even the sheer amount of files a Rails project has by default is enormous for something that simple.