One weak point seems to me to be formula for the expected amount.

I'd have thought it would be less appropriate for a one off choice between hanging on to an envelope and swapping it for just one other containing either half or double, and more for one in which there were a long series of such envelopes each either doubling or halving the previous, making it more and more likely as you go on that if you were to stop you'd be 25% ahead of that first envelope. If you started by swapping £10 for the chance of getting £5 or £20, and then getting and swapping back £5 for £10 or £2.50; or instead getting and swapping back £20 for £10 or £40, the formula suggests to me the longer you go on doing this the more likely you are to have 5x£10/4 = £12.50 when you arbitrarily stop.

Swapping under these conditions becomes more reasonable as you go on, given you never know what's in the envelope you have now and thus able to retire earlier with bigger winnings. But at least you never come out an overall loser from when you started, at worst just ahead by a ridiculously small fraction of a penny.