This is a Damian and Danny are twins but with a twist.
Through a series of unfortunate events a very young Danny gets put into the pit. Maybe it was a test from Ra, he was sick this was trying to save him, he was pushed purposely or he fell in accidentally. He never rises from the pit everyone thinks he died. But with Danny being in the pits (which is ectoplasma) Clockwork is able to grab Danny and send if off to Jack and Maddie. If Danny had stayed with the Al Ghul's he would have died. Now Clockwork works with time not space. It harder for him to send beings to a certain place during their present, it easier for him to get them directly where he wants them if he is sending them forwards or backwards. So when CW put Danny into the path of Jack and Maddie it is years in the past for Danny.
This is going to be a good parent Jack and Maddie. Jack and Maddie are having infertily issues. It was very hard to conceive Jasmine and afterwards the Doctors gave even lower chances of them having another natural child. They start looking into adoption but due to their research into ghosts they are not having luck. They about loose hope when they meet Danny. Danny is too young to really remember the League, so he grows up with no memories. He knows he adopted, Jack and Maddie didn't hide that from him.
Things progress the about the same as in the show, and it's a reveal gone right. Also when the Meta Human Act is put into law it repeals the Anti Ecto laws, so Danny doesn't worry about those anymore. He never really wanted to be a hero, he was trying to help because he felt responsible for the mayhem after he turned on the portal. Things become more stable in Amity Park and Danny is able to get his grades back up and pursue his dream of working for NASA.
Danny was brought to the past to grow up, I see him being around 5 years older the Dick in the present. When Danny was a teen the Justice League was being formed. Danny doesn't discover his bio parents until he is in his 30s. How this is discovered is Star Labs is partnering with JPL on a project they send over their top scientists, one of them being Danny. Barry sees Danny one day at the lab and at first thinks it's Bruce. He mentions to Danny how much he looks like Bruce Wayne, Danny laughs it off. Barry later in passing mentions to Batman during a league meeting that he met a Bruce Wayne clone. Batman and the Batfam take this info and do the paranoid thing and dig into Danny thinking maybe he is a clone. Then become confused when DNA says Danny is the son of Bruce and Talia, when he is older than Dick.