My cities produce a lot more than ten gold per turn because I build things like 'markets' and 'banks' rather than 37 shrines.
I don't think you're quite getting the point here. Depending on your starting tiles and tech path, you capital can probably be around 40 production by the time you unlock markets. A market costs 100 production.
Let's say your capital is at exactly 40 production. That means it'll take 3 turns to complete a market with 20 overflow for whatever you queue up next.
Sell and rebuild shrines often.
Turn
1 - Sell shrine for 10 gold, put it in the queue with market queued up after it.
2 - Shrine completes and dumps 40 overflow production into market.
3 - Market is now at 80/100.
4 - Market completes with 20 overflow. Sell Shrine and queue it up with whatever you want after it.
5 - Shrine completes with 60 overflow. (2x40 production + 20 overflow from market - 40 for Shrine cost)
6 - Next item is at 100/???
Or
Never sell and rebuild shrine.
Turn
1 - Market added to queue at 0/100
2 - Market 40/100
3 - Market 80/100
4 - Market completes with 20 overflow.
5 - next item is at 60/??? completion
6 - Next item is at 100/???
In both cases the market completes in the same number of turns, but in the first case, you're ahead 20 gold from selling the Shrine twice.