In terms of tricks you can use to help, you can use Focus whilst driving (on the PS4, this is the R3 button). Focus is an unlockable skill that makes time slow down for a short period of time. It costs just one skill point, so is cheap to pick up in the early stages of the game.
With Focus, you have much more time to interact with the environment whilst driving, so looking behind and picking the perfect moment to hack that barrier is even easier.
As stated in the linked wiki article:
Focus can be used whilst driving, but will not enhance a vehicle's
handling. However, it will give the player more time to plan and use
You can unlock several bonuses to Focus if you find you need more time. In addition, going into a coffee shop, or some other food/drink venue in-between missions and buying a drink will give you a temporary bonus to the amount of focus you have (the bonus focus appears in blue).
The game will occasionally mention this use of focus during a loading screen hint.
Use the visual indicator
As stated by @Chippies, if you hit the hack button (on PS4, this is the Square button), at the moment the hack indicator reticle flashes blue, your hack is almost guaranteed to be effective. The effectiveness depends on the type of hack - for example, I found barriers and gas pipes to be highly effective, and traffic lights to be much less effective.
Use the audible indicator
The blue reticle also comes with a audible cue. If you're finding there is too much on the screen to concentrate on whilst driving to look for the reticle turning blue, you can turn up the volume and use the beeping sound to choose the right moment. The beeping will get higher-pitched and then become a solid tone at the right moment.
Learn the routes
My final tip only comes from experience. The map in Watch_Dogs is refreshingly large and varied. But over time you will get to know some of the areas of the city and surrounding areas. You will learn where you might find a line of barriers, or a straight section with a couple of steam pipes you can use. Use your knowledge of the city to direct your pursuers down routes that have hackable features you can make use of, or large straight sections where you don't need to concentrate so much on taking corners.
A combination of the above should make hacking whilst driving much easier.