Arduino keeps crashing during serial print

Ok maybe I will add another check like you mentioned to check mqtt and internet connection. Reset if that stops.