The certified Microsoft solution is to configure Office365 to accept emails requests from a secondary “mailserver” or scan-to-email device.
1. You accomplish this by adding the IP address of the source server in the SPF configuration
Including IP addresses in your SPF record – Validity Help Center (returnpath.com)
2. Whitelisting this IP address on Office365 by configuring a “connector”.
Set up connectors to route mail between Microsoft 365 or Office 365 and your own email servers | Microsoft Docs