I propose adding a new EAS Build lifecycle hook that runs immediately after package dependencies are installed (e.g., after npm install) but before expo prebuild or pod install.
In our project, we are using ignore-scripts=true to prevent unwanted scripts to run when installing npm packages. That also disables npm's native "preinstall"-hook. We are using @lavamoat/allow-scripts, to run white-listed scripts, after install.
We have to use eas-build-post-install at the moment, but that runs AFTER prebuild. That could cause issues, if there's any packages used in prebuild, that need to run scripts pre or post-install