@100_Ez100r, Thanks for posting in Q&A. From your description, it seems app is installed failed on some devices. From the error message, it seems the app you deployed is win 32 app.
Based as I know, win 32 app is deployed via Microsoft Intune Management Extension. For the agent installation failed. I wonder if the agent is IME related. Please check on the affected device to see if the Microsoft Intune Management Extension service is running on the affected devices.
Meanwhile, for the error "The application was not detected after installation completed successfully (0x87D1041C)", it seems the detection rule is not correct. In fact, the rules to detect the presence of the app. if the registry key or file you set is not on the affected device after installing the app, the error will come. Please change one which is on the device after installation to make it work.
https://learn.microsoft.com/en-us/mem/intune/apps/apps-win32-add#step-4-detection-rules
Hope the above information can help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.