Dispatch of battery storage systems for stationary grid applications is a topic of increasing interest: due to the volatility of power system's energy supply relying on variable renewable energy sources, one foresees a rising demand and market potential for both short- and long-term fluctuation smoothing via energy storage. While the potential revenue attainable via arbitrage trading may yet surpass the steadily declining cost of lithium-ion battery storage systems, profitability will be constrained directly by the limited lifetime of the battery system and lowered by dissipation losses of both battery and power electronic components. In this study, we present a novel three-dimensional mixed-integer program formulation allowing to model power, state of charge (SOC), and temperature dependence of battery dynamics simultaneously in a three dimensional space leveraging binary counting and union-jack triangulation. The inclusion of a state-of-the-art electro-thermal degradation model with its dependence on most influential physical parameters to the arbitrage revenue optimization allows to extend the battery lifetime by 2.2 years (or 40%) over a base scenario. By doing a profitability estimation over the battery's lifetime and using 2018 historical intraday market trading prices, we have shown that profitability of the system increases by 11.14% via introducing SOC awareness and another significant 12.64% via introducing thermal sensitivity, resulting in a total 25.19% increase over the base case optimization formulation. Lastly, through the open source publication of the optimization routines described herein, an adaption and development of the code to individual needs is facilitated.