Old Cap: He leaves, goes to an ALTERNATE TIMELINE. So he's there, not in the past of the "Main" timeline. He's in, let's say, timeline B. Timeline B continues and he allows everything in Timeline B that occured in Main Timeline to happen. Why? Because it's not truly his timeline. And as bad as that shit is, he knows they all eventually get through it. And again, if he interferes he could set the Timeline B on a weird path that would be potentially worse and unfamiliar to him.
Cap could come back whenever he wanted. He had the time travel compass. There's no reason he didn't come back when the original team left and then just wandered away until everything was done and then came back for Stark's funeral at the right time. Literally this would involve old Cap using his time return device AT ANY POINT when Tony has created the time dilation device or whatever the fuck it is.
As for the "her husband" thing and Peggy Carter, I don't think that's Cap in the main timeline. It's just another person they haven't revealed or won't reveal because not every fucking person in the marvel universe has to be a superhero or something. Cap is Peggy's husband in Timeline B, and when she dies he comes back to Main Timeline. At no point is anything he's doing influencing the outcomes or past of Main timeline as they explicitly mentioned this like, 3+ fucking times.
The last episode of Future Man actually shows this to a much better extent. You can't go back and change the past. You can only create new timelines.