I had the same issue with my energy monitor.
For me anyway, the solution was to completely bypass Home Assistant when saving the data. Instead of publishing via MQTT, I added to a MySQL DB. Then used SQL sensors in Home Assistant to read from the DB.
Details in this thread: How To Save Sensor Data To MySQL Database?