Who is your carrier? Verizon's Messages+ does this as an option. So far it's the only SMS app that I've found with this feature.
I do this with Tasker, an automation app. It is a paid app but it does so much and you can find forums for users on just about all Android forum platforms. There is also a wiki online filled with profiles created by other users that are easy to download and get running on your device. There is a learning curve associated with this app. it works off of logic statements so for your SMS issue mine is, when my phone is connected to Bluetooth x and an SMS comes in, reply to sender, I am driving and will reply to your message once it is safe to do so. If you want to know more about Tasker there are tons of videos about it on YouTube and any search will bring up places to get help or download profiles.
I don't know if any of the other automation apps are capable of this. Bixby may also be able to do this with a Bixby routine. It uses logic statements but I'm not sure how much automation it is capable of...?