Of the two Mercedes drivers, it was the 38-year-old Hamilton that struggled the most with the porpoising W13 as the seven-time World Champion frequently complained of pain in his back and jaw.
Following the Azerbaijan Grand Prix, a noticeably distressed Hamilton was seen climbing out of his car and grabbing his back, leading team boss Toto Wolff to apologise to his driver.
Mercedes were eventually able to fix the problem, in part due to a new technical directive introduced midseason by the FIA, but it was a testing period on the relationship between driver and team.
Shovlin, Mercedes' trackside engineering director, admitted that at times they were giving Hamilton a car they knew was "bordering on dangerous."
"There were some difficult points where we knew that the car that we gave them in Baku, in Montreal, in Imola and all those races - it was bordering on dangerous," he told Motorsport.com.
"And that certainly focuses your attention to make sure that we dig ourselves out of that position and start giving them something that they can race in again.
"But the whole team has been through a lot with Lewis, and it's great that we have such an experienced driver when we've had such a challenging year.
"Hopefully, we're now through the worst of that challenge and we can get on with the next challenge, which is hopefully fighting our way back to the front and fighting for championships."
Shovlin admitted that 2022 was a challenging year for the team but even more so for Hamilton having endured the 2021 Abu Dhabi Grand Prix and missing out on a record-breaking eighth world title.
"I think for Lewis it was particularly challenging coming off the back of 2021," the British engineer said. "He knew how he wanted to respond in 2022 and we were unable to give him a car to allow him to play that role. And it was definitely a difficult time. But I think the process has been good for the team.
"One of the biggest challenges we had was sticking together and working together, which we've come through well and I think the experience will serve us well further down the line.
"Tricky cars like that on the back of a run of success are quite a difficult thing for a team to deal with, and it's a case of working out: 'what is it you do as an organisation that's good that needs to be kept, and what is it that you do as an organisation that's not good enough and you've got to change?' And that, again, was a process that we were running through for a lot of the year."
With the porpoising issues now behind them, Hamilton is again one of the title favourites heading into the 2023 season.