In railway construction practice, we are increasingly faced with the problem of having to pass our new lines through areas with unfavorable subsoil conditions or with the need to reinforce the substructure of our existing lines due to increasing traffic demands (speed, axle load). The low strength, high compressibility, and low permeability of unfavorable subsoil will result in stability problems and prolonged consolidation with extremely high settlements, respectively. One of the effective technologies to counter the geotechnical problems is the deep mixing. The technology requires the addition of a binder (cement, lime) to the local soils. These materials have a high installed CO2 emission, thus significantly increasing the ecological footprint of infrastructure development. Due to the increasing demands on reducing CO2 emissions, secondary raw materials, e.g., fly ash or slag, have been increasingly prioritized. The study reports the methodology for calculating the ecological footprint of deep-mixing as an embankment foundation. Based on a simple case, the effect of different cement content (5 and 8%), and the application of slag and fly ash as a secondary raw material is analyzed, and the ecological footprint is calculated separately. The results show that the ecological footprint of deep mixing can be drastically reduced; under the conditions of the study, the reduction compared to clean cement is 40% for slag stabilization and 50% for fly ash.