I’d just throw an analog min/max thermometer in there and investigate if the max temp goes above 40F, sounds a lot easier than adding a temp probe and door switch to a residential refrigerator.
There is already a door switch in all the refrigerators I have used. It controls the light (at least I think it does, I have never seen the light go off:)