Is the eventual goal to move most formula/cask behavior into declarative install steps and treat Ruby as an escape hatch?

Yes, exactly. The goal is you can install all official packages without needing custom postinstall/preflight/postflight blocks.