BOSTON — CC Sabathia threw another bullpen session Monday and his right knee held up fine, so the Yankees left-hander is still scheduled to take the mound Wednesday in Detroit.

As rough as the season has been for the 39-year-old, Sabathia said he’s happy he even has the option to pitch — and added he likely would have had season-ending surgery already if the Yankees didn’t have a chance to win the World Series.

Asked if the thought of another title has helped keep him going through four IL stints this year alone, Sabathia said: “It’s the only thing. I think if this team wasn’t in a position to win a championship, I probably would have had the surgery a long time ago.”

Sabathia has talked about having his knee replaced once his playing days are over — which he hopes isn’t for another month-plus.

“This is way better than I thought,” Sabathia said of how 2019 is ending up. “I didn’t think I was gonna get to this point, not with this knee. I think we knew coming into this season it was gonna be a battle. To still be able to have a chance to make starts is all I wanted.”

The rest of the regular season will be a balancing act for Sabathia, who wants to stay sharp for the playoffs as well as give his knee rest. But he knows he could suffer another setback at any point.

“There’s nothing really to manage,” Sabathia said. “If you wheel me around in a wheelchair … there’s nothing I can do. It flares up when it flares up. I feel good right now and knock on wood it continues to feel good.”

Sabathia was also agreeable to the idea Aaron Boone floated about possibly coming out of the bullpen in the postseason.

“It doesn’t matter,” Sabathia said. “Whatever my role is in the postseason, I’m good for it.”

And he doesn’t believe warming up in the pen will be an issue.

“My [pregame] warm-up is pretty much like a reliever anyway,” he said.

Sabathia called Sunday’s pregame ceremony held by the Red Sox “awesome.”

He was presented a “52” panel from the Green Monster by David Price.

“Price is like a little brother to me,” Sabathia said. “To give me a little piece of Fenway is pretty cool.”

Sabathia will be followed by Domingo German on Wednesday as the Yankees look to limit German’s innings in September — and get him used to a bullpen spot.

German was told of the plan on Sunday and noted he did the same thing in a game in April, when he tossed two scoreless innings after Sabathia threw five shutout innings.

The right-hander’s routine is not expected to change and if he’s used as a reliever in the playoffs, German said he was “fine” with it.

“We’re trying to win a championship,” German said through an interpreter. “The game will be the same.”

Gio Urshela was back in the lineup at third base on Monday after being activated from the 10-day IL on Sunday. He homered and doubled in the 5-0 victory.

Jordan Montgomery (Tommy John surgery) is slated to start for Double-A Trenton on Tuesday, followed by Luis Severino (strained lat) on Wednesday.

The Yankees finished 14-5 against the Red Sox this season, the most wins by a team versus Boston since Detroit went 15-3 in 1973. “Since the first series, they just dominated us,’’ Boston manager Alex Cora said.

Boone said he was surprised by Dave Dombrowski’s ouster as Boston’s president of baseball operations late Sunday less than a year after the Red Sox won the World Series.

“It’s shocking,” Boone said. “A guy like Dave who’s had such a great career in this game and the recent success he had here. I think it caught me and a lot of us off guard.”