When the phone is too hot, it should try to cool itself down and it will display.
As far as I could tell when I experienced this, you can't choose what happens. I'm sure it closes some background apps, but mine left navigation running. I believe it does things like reduce screen brightness, limit the CPU, etc.
If it successfully cools down, it won't shut down. In my case, once I knew that the warning meant that it was probably going to shut down, we adjusted the dash mount's long arm so that the phone was in front of the A/C vent and that was enough for the warning to go away and the phone to continue to function. In the event that it actually shut off, I immediately removed the back cover and battery and let it cool down. I would assume it would either not boot up or would shut right down again if you turned it back on while it was still hot, but I'd wait until it felt noticeably cool.
Even if the phone never gives the warning that it's cooling down, it's not good for it to run too hot for too long. The warning means that you've gone too far for too long and let it be hot, so the phone's software has decided to take over. Using the phone for hours at a time while it's hot, even without the warning showing up will seriously degrade the battery and many other components over time. You may not notice any issue right away, or even after a few weeks of 8 hours a day usage like you've described, but it will eventually catch up to you and it won't be pretty when it does.
You can buy a dedicated dash cam for around $100-$150 online. If you really want to run one for that length of time, I'd suggest making the investment in one that will allow your phone to be utilized in a safer way.