Forward the MQTT message subscription to an external subscription and add some custom rules in the middle
Share the device to your friends, but not directly let him directly control your device, prevent incoming some malicious error messages, do some rules to qualify and protect the device information security.