I didn't have time to look into it over the weekend but I was still curious so I got around to it this morning.
TLDR: Yasmani bunting is a bit worse than Yasmani swinging away, but both are WAY worse than having Robert try to steal second base.
So comparing the three scenarios depends a lot on what Robert's chance's of successfully stealing second are. Here is a plot of the Sox' chance of winning in the 9th versus the chance of Robert stealing second base.
We can see that Yasmani sac bunting dropped the Sox chance of winning in the 9th from 42.6% to 37.6%. If Robert succesfully steals second, the Sox won in the 9th 63.4% of times. If he got caught stealing second, they won in the 9th 17.1% of times. Robert currently has a career stolen base success rate of 86.6%. If that is the true chance of success, having Robert attempt to steal second would have given the Sox a 57% chance of winning in the 9th. However, to be better than having Yasmani swing away without Robert stealing, the stolen base success chance only needed to be 55%. And to be better than the actual scenario (Yasmani bunting), Robert only needed a 44% chance to steal 2nd base. The Yasmani bunt win percentage is a bit of an overestimate too, since I had no way to take into account the possibility of the sac bunt failing.
So we can see that having Yasmani bunt instead of swing was probably not a good decision, but didn't have a huge effect, but not having Robert steal 2nd was almost certainly a terrible decision.
Methodology:
Player performance for this simulation was based on the 2021 updated ZIPS projections on fangraphs, adjusted to reflect career platoon splits using data from the last three years. There isn't enough baserunning data on Robert yet so I ran the simulations with the chances of taking extra bases or advancing on an out set to league averages from 2019 (which is almost certainly a conservative estimate). I ran 100,000 simulations for each scenario.
Reasons these win percentages might be an overestimate:
ZIPS is not really buying John King's breakout yet. In particular, his walk rate according to ZIPS is much worse than he has shown so far this year. He may be a better pitcher than ZIPS indicates.
ZIPS is still projecting Yas to be about what he has always been, so if you think he is worse than that, the Sox chances of winning would go down a bit, less so for the bunt.
Double play chances are set to league average, but Madrigal has high ground ball rates and may be more susceptible than league average to a double play.
Reasons these win percentages might be an underestimate:
ZIPS projections for Mercedes and Madrigal are arguably too conservative.
John King had thrown a lot of pitches already, and the simulation does not have a model for pitcher fatigue
Robert is almost certainly much better than league average at taking extra bases
General sources of innacuracy:
No strategy is taken into account (i.e., you could have Robert steal second and THEN sac bunt him to third, or you might have fielders playing in and coming home with it, etc)
King, Mercedes, and Madrigal have too small of sample sizes to be very confident in the platoon adjustments.