The cost of electricity per Bitcoin in turn depends on the computing power invested in the network. The strength of the next block is adjusted so that it takes approximately 10 minutes for the network to solve it.
Also there are optional transaction fees.
Right, that's what I'm saying: As more people join the network it becomes uneconomic to mine bitcoins, because since it's harder now, it costs too much electricity. So those with the least efficient setups stop mining.
So the price settles at the cost of electricity.
Then they reduce the number of coins per block. So suddenly it comes even less worth it to mine. Until the value of each bitcoin rises to match, causing people to want to mine again.
If the value of each bitcoin did not rise, no one at all would mine and the network would grind to a halt (no confirmed transactions).
Unless they have a mechanism to reduce the difficulty factor at that point. I'm not sure on that point.
"If the value of each bitcoin did not rise, no one at all would mine and the network would grind to a halt (no confirmed transactions)."
This isn't true. The system has several modes of adjustment and it will always be worth it for someone to generate blocks. If the value of a coin didn't rise to match generation costs, people /should/ stop mining -- but those that remain will collect more coins or transaction fees as the difficulty drops to compensate. Overall the economy as a whole shrinks, but never grinds to a halt.
The miners can only ignore transactions that don't carry a fee or a fee that isn't large enough. But other miners will likely accept those transactions, so the miner isn't forcing the fees up but instead letting them pass him by.
More likely the inefficient miners will be forced to quit mining as they will not be able to compete with those who either don't pay for power, or are not a commercial endeavor that is doing so at a larger scale.
Whether that is two months or four years away, who knows.