☒ I'd say for a Rails 5.2 application, this is still probably along the path that you would have to go. I think that it was Rails 6 that added environment based encrypted credentials.
If you're using webpacker currently, then I would still go that route. If you're just starting out a new application, I would probably go the esbuild route from jsbundling-rails. This is going to be one of the more supported options in the long term.
☒ Did you make the change in the hello_controller as well? I've been on an Apple M1 for some time now and haven't experienced any issues with bundling the gems.