> wouldn't a electronic ledger be must safer and reliable than if the government say just started printing more money leading to inflation problems
No. Aside from the added vulnerability of the infrastructure needed to maintain and interact with an electronic ledger, such a system either still allows a government to issue new tokens (and thus has no effect on the issue you raise) or requires blunter, higher overhead means at serving the same national functions that wartime money printing serves, which means either (or both) more internal disruption or greater probability of losing the war.
No. Aside from the added vulnerability of the infrastructure needed to maintain and interact with an electronic ledger, such a system either still allows a government to issue new tokens (and thus has no effect on the issue you raise) or requires blunter, higher overhead means at serving the same national functions that wartime money printing serves, which means either (or both) more internal disruption or greater probability of losing the war.