If you really want to guarantee you won't need to travel by bus, you could buy a ticket for travel on the service before and then submit this to their customer relations asking for compensation in line with your rights under the "reasonable care and skill" provision in the Consumer Rights Act. I think that this would be quite persuasive and as a minimum you could expect to arrive on time at your destination and have them cover this extra cost, as it will almost certainly be less than the delay repay bill they'd have had to pay. Obviously, if the ScotRail service were exorbitantly expensive or there weren't one at all then you wouldn't do this, but the normal flexible single from Aberdeen to Edinburgh is £43.10. Unfortunately this introduces a whole lot of additional hassle for you, and of course you can't expect to be compensated for wasting your time dealing with it all, nor for having the inconvenience of getting to the station earlier, so it may be far simpler to just take the risk you'll have to travel by bus.