There's a lot of distrust between owners and players in MLB. I don't think they can figure out a salary cap system unless one side (the players) completely folds, and that's probably going to take a lost season like what happened with the NHL.
The last time the NBA had a lockout that led to missed regular season games (2011), it was because allegedly the majority of teams were losing money and the players were getting a larger share of the revenue split. I haven't looked too deeply into MLB's financials, but I'd be shocked if either of those things were true in MLB right now. I'm sure some teams are in the red (or claim to be) but I doubt it's wide spread especially with revenue sharing and no salary floor, and I'd be surprised if the players were getting even 50% of league revenues at the moment. I don't even think a salary cap/floor system would benefit most of the owners.
My guess is there will be harsher penalties for going over the CBT in the next CBA, and little adjustments here and there, but I'd be very surprised if it bled into the regular season. MLB and ESPN had a divorce recently, and when MLB had to sell ESPN's rights elsewhere, they made sure those rights were only for 3 years so that all of their national and international rights expired at the same time (2028). I don't think they do that if they thought they'd miss games in 2027. Imagine missing parts or all of 2027, and then trying to sell a package to Netflix or Amazon for the rights in 2028-29. Owners aren't stupid, but maybe I'm just being cautiously optimistic. Would hate to lose games obviously.