MQTT data persistence not possible due to automatic unsubscribe before disconnect

Just an idea, but would RabbitMQ help you? It's a queue and is able to retain messages when the client is not available.
https://www.rabbitmq.com/tutorials/tutorial-two-python.html