Molina's sixth career grand slam provided a cushion for St. Louis, making it 11-5 with two outs in the ninth.
"It did work out. We were happy with it," Shildt said. "Just thinking about different ways as the lineup has looked the last couple of days, maybe lengthening it out, spreading some things out a little bit."
The Cardinals, who occupy the second NL wild card spot, hit five homers overall as they stopped a three-game skid.
Making his second major league appearance, reliever Austen Williams (0-1) gave up all three of those homers. He allowed none in 68 innings this season in Double-A and Triple-A.
"There's just things that I might be able to do in the minor leagues that I can't here," Williams said. "I need to trust my breaking ball more and just try and be better with two strikes if I want to throw a fastball."
The 4-hour, 10-minute game included 16 walks and 20 strikeouts. St. Louis pitchers walked 11.
"The walks are concerning. That's 11, 10 yesterday and eight the day before," Shildt said. "It's actually kind of impressive. ... We've had a real opportunity to win all the last three games."
Wilmer Difo homered and Bryce Harper had a double and three walks in five plate appearances for the Nationals, who fell one game below .500 after relievers Williams and Solis combined to give up seven runs.
"They are going to get an opportunity to pitch, so they got to realize if they want to pitch here they got to get outs," manager Dave Martinez said. "I can't keep using the same guys every single day."
Ozuna led off the second with his 17th homer, and Matt Carpenter capped the inning with a two-run single that made it 4-0.
Washington rallied in the fifth when Zimmerman led off with a grounder to second that second baseman Munoz misplayed for an error. Harper later drove in two with his bases-loaded double, and Trea Turner and Juan Soto drew bases-loaded walks.
St. Louis picked up a first-inning out when Harper walked on a 3-2 pitch with Turner running from first. Despite the walk, catcher Molina threw to Munoz. The Cardinals appealed the play, and upon review Turner was called out. Though entitled to second base via Harper's walk, Turner slid past the bag and was tagged out.
The Nationals recalled a top prospect, OF Victor Robles, from Triple-A Syracuse along with INF Adrian Sanchez and RHP Austin Voth and selected the contract of RHP Kyle McGowin from Syracuse. Robles flied out as a pinch-hitter in the sixth. Washington reinstated Fedde and RHP Joe Ross from the 60-day disabled list and activated LHP Tommy Milone from the 10-day DL. Milone was then assigned outright to Syracuse.
Cardinals: Manager Mike Shildt said 2B Kolten Wong (left hamstring strain) will be activated Wednesday.
Nationals: LHP Sean Doolittle (left toe inflammation) will throw another simulated game Wednesday. "His (velocity) was a little down in the last one so we just want to make sure he's not tinkering with his mechanics or anything like that," Martinez said. ... RHP Jefry Rodriguez will move to the bullpen to limit his innings and Ross will start Friday against the Cubs.
Cardinals: RHP Miles Mikolas (13-4, 2.96 ERA), who was originally listed as Tuesday's starter, will instead go in Wednesday's finale. He gave up four runs in seven innings to Washington on Aug. 13.
Nationals: RHP Tanner Roark (8-14, 2.96 ERA) makes the second home start of his career against the Cardinals.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
How the Phillies can be smart spending stupid amounts of money
The Phillies have plenty of payroll space and expectations of contention to deliver on. Here's a plan for which top free agents they should target.
Buster's Buzz: A checkup on the state of baseball
A new TV deal and strong attendance don't jibe with complaints about the changing game. What are the strongest indicators of the sport's health?
Astros acquire Aledmys Diaz in trade with Blue Jays
The Astros, who could lose Marwin Gonzalez to free agency, acquired infielder Aledmys Diaz, who hit a career-high 18 homers last season, in a trade with the Blue Jays.
Dodgers closer Kenley Jansen set for Nov. 26 heart surgery
Dodgers closer Kenley Jansen is expected to be ready for spring training after surgery to correct his irregular heartbeat. The surgery, which had been expected, has been scheduled for Nov. 26, with recovery time anywhere from two weeks to eight weeks.
Red Sox re-sign Series MVP Steve Pearce on 1-year, $6.25M deal
World Series hero Steve Pearce will be back in a Red Sox uniform in 2019. Boston re-signed the journeyman 1B for a reported $6.25 million. "We all saw what kind of impact he can have," GM Dave Dombrowski said of the improbable World Series MVP.
Rangers hire Julio Rangel to handle pitching staff
Julio Rangel has been hired by the Texas Rangers as pitching coach for new manager Chris Woodward.