Switzerland has the most dense rail network in the world and is 100% electrified. However even before the pandemic SBB cargo was in the red. To reach our climate goals we need to increase the amount of cargo on rail (currently around 46% of cargo is by rail). There is no way around it but they will need government funding to reach those goals.
Such gimmicks have extremely high costs. Each on of those needs maintenance. A regular cargo car is quite dumb and can take a lot of abuse.