Climate change, partly driven by rising emissions, has damaging and often irreversible impacts on entire economies. In this context, production processes play a crucial role, as they affect the level of pollution, causing environmental degradation, and affecting human health. Sustainable production methods and stricter environmental regulations can help mitigate these effects. However, their effectiveness depends on many factors as, for instance, the attitude towards greenery by firms and their convenience in breaking the rules. In the present work, we propose a dynamic framework to describe how and in which measure the production processes influence the environmental quality, considering the presence of non-compliant firms and the attitude toward greenery. We obtain a 3D piecewise-smooth dynamical system describing the evolution of the fraction of polluting firms, the monitoring level by the State, and the environmental quality over time. By analyzing the effects on environmental quality of the environmental regulation enforcement for different greenery propensities, we show that: (1) if the propensity for greenery is high, the system will converge towards a good equilibrium, that is, with high environmental quality and absence of dishonest companies; (2) if the propensity for greenery is at an intermediate level, the system may converge towards good or bad equilibria; (3) if the propensity for greenery is low, further internal attractors may emerge.