Stamp duty doesn't tax gains. It's a tax on buyers, not sellers.

It's absolute insanity

Oh, so GP was just incorrect in calling this a tax on gains. That explains why repeat buying and selling incurs more tax.

Large sales tax on home purchases is probably a generally bad idea. Looks like Bay Area pricing would incur a 10-12% tax under the UK scheme which seems pretty crazy.