How to handle with broken module installation
Before the module installation you export your site configuration with drush cex. You install your module and if it crash you import the saved configuration with drush cim.