These type od apps should help in the near future:

"Soon, Apple will introduce a new iPhone feature that will do away with that annoying -- and dangerous -- urge to look at a text message while you're driving.
The feature, called "Do Not Disturb While Driving," will be part of Apple's iOS 11, a new version of the operating software for Apple mobile devices.

Whenever the phone is connected to a car using either Bluetooth or a cable, or if the car is moving, the phone will withhold any notifications for things like text messages or news updates.

If someone does text you while you're driving, the phone can respond with an automatic message telling them you're driving and can't respond just now."