I'm going to address your math directly.
So, let's say we invest $100,000 and get a 7 % return, i.e. $7,000 a year later. Say you pay 25 % in taxes. You then only get $4,550. So you have $104,550 now. Say you pay 0.4 % to the index fund. That's about $400, so say you now have $104,150 dollars. Let's calculate the present value before we subtract commission fees (which are of course paid in the present). If inflation is 3 % and the interest rate is 1 %, then we need to discount by 1.04, which gives us $100,144. Subtract $144 for the commission fees, and you end up with the exact same amount you started with! All you've done is beat inflation, basically.
First, most areas don't require you to pay taxes until you realize your capital gains.
So you have $7k in deferred income and $107k. No taxes have been paid. This is important, as deferred taxes are amazingly powerful.
You pay 0.4% to the index fund. So you actually have $106.6k, and have a future tax liability of $6.6k. Costs to invest are costs, not paid for out of taxable income.
Now, you paid a commission. The thing is, you only pay that once, and it too is deductible. You have $106.456k.
You have $6,456 in future tax liability and $106,456 after 1 year.
It is true you could have put the money in a bank. That money in the bank would earn $1k and be taxable immediatly at 40% (interest is usably higher taxed), leaving you with $100.6k after one year and no future tax liability.
Lets try 10 years.
You have a 6.6% return (after index fund fees), that compounds to 89.48%. You invested 100k and spend $144 on commission, so you started with $99,856 and end with $189,207.15 10 years from now and a $89,207.15 tax liability.
You liquidate and pay 25% taxes on your profits leaving you with $166,905.36.
Inflation of 3% per year means its value is actually 1/1.344 smaller than it is; it is worth $124,185.54 in "today's" dollars, or 2.4k per year.
Meanwhile, your option with the bank account. You earn 1% but pay 40% taxes each year, earning you 0.6% after tax. $100,000 * 1.006^10 is $106,164.62, an after-tax profit of $6164.92. Sadly, inflation also eats into this, leaving you with $78,991.53 equivalent in today's dollars.
So after 10 years you ended up with $24k free and clear in today's dollar value, plus your initial store of value back, and you have $45k more (in today's value) than if you put it in a savings account.
Instead you do it over 20 years you have $358,524.02. You liquidate and pay $64,631.01 in taxes, leaving you with $293,893.01. 20 years of 3% inflation means it is worth 1/1.806 as much as it seems, or $162,721.43 in today's value. You clear $62.7k in valid over 20 years, or $3.1k per year.
Note that this value is higher per year than the 10 year value. This is because we deferred taxes twice as far.
The numbers for the savings account will look abysmal. I'd be depressed to calculate them.
Finally, there is the route of a tax sheltered investment. Capital gains almost already cover this.
Suppose you have a 40% marginal rate and you can invest some pre-tax money in a shelter. When you take it out, you pay full taxes on the entire amount.
You have $100,000 in post-tax money, which is $166,666 in pre-tax money.
It grows by 6.6% per year for 20 years to $598,401.71.
You liquidate paying 40% tax and have $359,041.03.
After inflation this is $198,792.31, or $4.9k per year, post-tax.