Over the last decades, maintenance has experienced a transition from being a necessary evil to being a pivotal resource to create value for enterprises. Within the process of maintenance planning, distinct decisions could be responsible for different outcomes concerning profit and equipment reliability. Consequently, maintenance optimization has become pivotal to achieving relevant business goals. One of the most popular approaches to conduct maintenance optimization is simulation-based optimization, especially Discrete-Event Simulation (DES). Most works related to DES for maintenance optimization purposes focus on modeling imperfect maintenance or imperfect inspection and prognosis, while failures are often generated through a Weibull distribution. However, failure strongly depends on the production rate or the stress level, defining a Dynamic Non-Homogeneous Poisson Process (DNHPP). To this end, this paper proposes an algorithm for scheduling such DNHPP failure events in a DES framework model and, as a first implementation to apply it, an open-access library capable of generating stress level-dependent failures within the Rockwell ARENA© simulation environment. The developed package, that in the future will be ported to other relevant off-the-shelf simulation environments, provides a more realistic tool for maintenance engineers and researchers to optimize or compare maintenance strategies from an economic perspective.