I think they just need to tie him into Asgard. Like he assaults Asgard, fucks shit up, takes the gauntlet, then goes for Earth. Maybe have him kill Odin or a few others in the process to make him a more credible threat (as if he needs that).
Have him show up on Earth (or hell, send The Avengers to Asgard. Maybe Thor calls in a favor), and have The Avengers, Warriors Three, etc, and maybe even The Destroyer trying to take on Thanos.
The final part of the battle? Thanos has fucked everyone up six ways from Sunday, and Cap is the only man left standing, Infinity Gauntlet style. He tries and put up a fight, but in his last desperate act he actually picks up Thor's hammer and smashes the Infinity Gauntlet and kicks Thanos's ass from here to right over there. Audience goes nuts.
And I think if they use the time gem stuff like undoing all the damage it will feel like a copout in the movie. Yes, they did that in the comic, but it would feel cheap in the movies.