Presumably the device will do the recording with the screen turned off, so it will generate little heat internally. So I think placing most of the device behind something to shield it from sunlight should be enough to avoid heat issues.
Though I agree with others here that a cheap specialized dashcam device is much better.