DHT22 freeze for no reason

Welcome to the forum. The DHT series of sensors are not the most reliable, for temperature, the DS18B20 from Maxim is probably the most used sensor and is very easy to interface with node red if you are using a Rasperry Pi.