What would worry me is that this is probably the 4th sector for that plane that day. So if it has accrued any delays earlier in the day for any reason then you might be up a creek. Looking at the equivalent of that flight today on Flight Radar- at one point in the morning it was 45 minutes late for some reason, although that was recovered to 20 late eventually. There is 30 minutes on the ground at Stornoway, so some potential built in recovery time there.
Booked today a mid afternoon Advance train ticket EDI- Kings Cross is £52.30. The problem is that there is no longer a fixed price flexible train ticket- it is called the 70 minute flex. So book for say 3pm, and you can travel on any train between 1.50pm and 4.10pm.
But that fare flexes from around £70 if booked today for 4 July, to around £120 for tomorrow. So even the train is a gamble.
The better train choice would be Avanti Advance Fare on the 1452 or 1652 to London Euston- £35 Advance Fare if booked today, before railcard reductions.
The 1652 train should be a pretty solid bet.
Don’t know where Ullapool comes into the equation and there is no train to or from Ullapool.
If the flight was cancelled it would be ferry Stornoway to Ullapool, then connecting coach Ullapool to Inverness, for the train.