I had this same issue with a custom PKG file, which installed happily on device 1, but threw the 0x87D30143 error on device 2. I realised I'd already tested the pkg on device 2 manually before uploading to Intune, and so checked the installed packages on device 2 with 'pkgutil --packages' and confirmed that MacOS thought the package was already installed.
Ran 'pkgutil --forget' on the package in question on device 2 and resync'd with Intune - the software installed with no issues.