Regarding 1. currently Phpstorm has no such option, but there is related YouTrack feature request: https://youtrack.jetbrains.com/issue/WEB-64513
I have similar problem with laravel and vite. Some kind of workaround is to create separate container with just Node.js image then configure Phpstorm to run utility commands via this container and keep other services in main one.