Hello Harald,
Great to see your interest in MQTT and HiveMQ! Check out this post with a learning video : Arduino example with server signed certificate - #9 by Chris .
Please let me know, if that is helpful for your ESP32 project.
Kind regards,
Dasha from HiveMQ Team