A lot of the time-travel plot breakage would be fixed -- not all of it but a lot -- if Tony
(a) actually sent Thanos and his army back to his own time, which just looked like ashing them (this would also explain Gamora's absence better);
(b) erased most of their memory so Thanos couldn't use his gained knowledge, including to wipe/reset the universe instead of his original plan to just kill half (but left a little memory of Stark being his ultimate downfall, thus explaining the "burdened with knowledge" exchange).
At that point, he could have sent the stones back as part of the package, too, but either that would require a second snap which he wasn't in condition to do, similar to Thanos having to recover enough to destroy the stones with a second snap -- or...
(c) he left the stones for Steve to take back so that Steve would have an excuse to use the time machine to go to the late 40s and live happily ever after. (Although there's a hint that he didn't actually marry Carter, since he didn't want to confirm who the ring was for, and he would have known he'd be messing up her original husband's happily ever after. It wouldn't be like Steve to sacrifice someone else's happiness for himself.)