Linking a device state to a MQTT topic

I have two Home Assistant instances linked together using MQTT, on different networks.

I have the devices on the ‘secondary’ HA broadcasting the devices states to:
“homeassistant/[light/switch]/[device name]/state”

and have the MQTT devices on the ‘main’ HA listen to that and send any change to
“homeassistant/[light/switch]/[device name]/statechange”

I currently have a automation on the secondary ha watching the “…/statechange” and if there is a change, it toggles the state of the device.

Is there a better way to directly link the state of the device to the MQTT topic rather than using automations, to better account for a larger scale?

HA MQTT event stream?

I’ve tried that, but it only ever picks up one of my automations - which I wouldn’t want it to anyway