A Factorio 2.0 mod (in control.lua & info.json) that periodically writes a JSON snapshot (factory_state.json) with:
Machine status
Inventories
Pollution
Fluid info
Production counts
Code is also on Github: https://github.com/intellicintegration/Factorio-MQTT-Notify