The purpose is to protect the usb device (specifically here a wired keyboard and mouse) firmware from being editing when switching between computers. The easiest solution is to use non-upgradable device (with ROM and not flash memory to store the firmware). But as suggested it's really hard to know which memory is used from a specific vendor.
So first, is there any known vendor that sell non-upgradable USB peripheral ? (But of course the security will only rely on the vendor that claims to use such a configuration).
Alternatively, hardware devices exist, such as the USG firewall for USB, which only allows whitelisted commands to pass through. However, as each vendor can implement the commands the way it wants to, can such a device prevent a firmware update that runs under "normal" commands (for example special arguments used with "write function" will start the update) ? And has anyone used that device before ?