Would sending some trains (probably Dunbar ones) via Brunstane make any sense. They'd have to miss Musselburgh but would allow them to get looped by fasts.
Given the lines through Millerhill are permissively signaled for freight only, and have a low max speed (30mph down to 5mph) I think the journey time penalty alone might kill that idea. Let alone the lack of capacity through Millerhill. There's an aspiration for a fully signalled route through the yard, but that's a big big job.
Wasn't there putative proposals for four tracking Drem to Wallyford a few years ago? If you could take the fasts off the line, then you could also probably run Dunbar - Waverley half hourly and give the stations nearer Edinburgh a 15 minute interval service. Perhaps with an hourly extension to Berwick to deal with the Reston problem.
Yes, but that's also a big big job. Putting those four on a four tracked section would buy you a couple of extra paths, but either way you're still sending up freight across Monktonhall Jn on the flat at 20mph, and down North Berwick services at Drem Jn at 25mph. Those both eat a few paths in each direction.
Fundamentally the solution is a high speed bypass along the A1 from Musselburgh to Dunbar, but that's an even bigger job.
A bear minimum basically consists of:
1. Four tracking part of the route, including putting three stations at a minimum on the four track section
2. Two extra east facing bays and remodelling the east end at Waverley, including:
2a. Double tracking through Calton North tunnel and
2b. A new single track around Abbeyhill to tuck ECS to/from Craigentinny and Millerhill depots
3. Completely remodelling Portobello Jn through to Newcraighall
That would buy you enough leeway for 2tph to North Berwick, an extra path to the Borders line, 1tph semi-fast to Dunbar/Berwick, and enough spare capacity for extra freight and the full complement of LDHS Anglo-Scottish services.