> Is there a better way of doing this?
Yes, you don't overtake if you don't have visibility because of a hill or a bend. That is enforced by traffic regulation and road markings in Europe and most of the places I've driven. And yes, that means that sometimes you get stuck behind trucks for a long time but it also means that nobody gets killed.