Is a story about the Hindu gods being real inherently copyright infringing on the Percy Jackson series? Is a story about a plague causing the apocalypse, then a street gang trying to restore order and government (without time travel) copyright infringing on 12 monkeys?
The premise of a story is not copyright infringement.
Here are some known stories that comes to mind:
A young male ant falls in love with the princess and has to save the whole colony. (Antz and A Bug's Life)
A comet is on collision course with Earth and a team is sent to nuke it. (Armageddon and Deep Impact)
A man arrives in a new world looking for riches, but falls in love
with a native woman and decides to fight for her people. (Avatar and Pocahontas)
As long as your plot and worldbuilding is different from where you found your inspiration, I don't see how that would be a problem. Nothing's unique anymore. Or at least so rare that even great authors have borrowed heavily from others.
Tolkien's The Lord of The Rings (Der Ring des Nibelungen)
Stephen King's "The Shawshank Redemption" (Leo Tolstoy’s short story "God Sees the Truth But Waits")
Sir Arthur Conan Doyle's Sherlock Holmes (Edgar Allan Poe's character C. Auguste Dupin)
Every idea in fiction has been used to some extent a bunch of times. I've thought of ideas and had them be in Percy Jackson specifically, actually, also (so I feel your pain).
Personally, I say you're fine. You reference Hindu gods, first of all, which, to my understanding, are very different from Greek, Egyptian, or any gods Rick Riordan has used in his books. He makes the gods interact directly with demigods and humans (kind of), and gives them senses of humor, makes them engage in petty arguments, etc. You could, hypothetically, involve the Hindu gods very differently. As long as you aren't basing anything off of something else, you can throw in your own flavor and make it original.
Same for your second idea - especially since 12 Monkeys' story relies heavily on time travel (god, that was a tripped-out movie...). And if you're really worried about it, maybe you could have someone read what you've written and see if they draw any direct parallels.
Your ideas sound cool. Good luck!