-(might have been a translation error, but) why did Trunks call the two androids #19 and #20 if those weren't the ones that he meant?
As mentioned, this wasn't so much of an error when it first came around. Toriyama intended #19 and #20 to be the Artificial Humans, but his editor didn't like the idea of an old man and fat guy being the ultimate enders of the world. So he created #17 and #18.
In the Kanzenban, this was fixed so that he calls them #17 and #18. The anime also avoided this issue. Unfortunately, the Tankoubon were stuck with the eventual error, which affected the translations as well.
-in the original timeline, why did 17 and 18 show up in the city at the exact same time and place in Trunks' timeline as Gero and 19 did in the main one? The main cast couldn't have known about Gero at the time, so they wouldn't have forced him to activate those two androids earlier than normal
Not sure I follow on this one. Could you explain it a bit better?
-in Trunks' timeline, why couldn't any of the surviving cast go to Namek and wish for the people killed to be brought back? They couldn't have brought back Goku, but the cast would probably be training for those twenty years in the afterlife, seeing as the only restriction on the Namek Dragon Balls was that you couldn't be brought back from death by natural causes
No one knew where the new Namek was. Remember that once Yamcha, Tenshinhan and Chaozu were back, the Namekians made one wish to go to another planet similar to their original one. Keep reading the story. You'll get an explanation from Goku about this when a certain problem rises.
-how could Cell's presence have changed the timeline to that extent if he had spent his four years there underground?
Which Cell we talking? In the timeline we've known, there was Cell that was still in development and the Cell that came from another timeline.
-why weren't 16, 19, or 20 active in Trunks' timeline?
Trunks altered the timeline by interfering with things. He mentioned this when he sees #19's head. Apparently his meddling with killing Freeza instead of Goku, as well as interacting with the others screwed with time.
-why didn't Gero give himself the infinite energy production and left 19 with the reliance on absorbing energy, if he had the technology when building 17 and 18?
It was a technology he wasn't completely finished with. He noted that #17 and #18 were out of his control, which is why he went with using the energy absorbing technology.
-how were all of the androids so ridiculously powerful (compared to the enemies that they fought on Earth) if the analysis of Goku and his friends stopped once they left for Namek?
Screw ups in time because of Trunks (his meddling made #17 and #18 stronger than in his own time) and typical Shounen manga logic.
-why is 16 as strong as Cell's first form? Did Gero build his androids backwards? Because it makes no sense to make the androids significantly weaker in the order that he builds them (16>17/18>19/20), leaving himself as the weakest one of the group.
He had #16 locked away for a reason. He was considered a failure likely due to his personality.
He didn't have any sort of master plan, he was making that arc up as he went along.
Technically, Toriyama didn't really fully plan ahead for any part of the series. He just went with what came to mind then and there.