I managed *-* relations by replacing them with a new entity and add 1-* associations between the original entities (and create a conversion flow for the existing data 🔀) and use Odata in combination of Power BI (Power BI is capable of analysing assocications and create relations based on the data, Excel not..) .
I like the idea of publishing a REST API that should work. Maybe you can use the java action to getGUID for getting the ID's on demand of a record (not the fastest option I think in case of high volumes). Let us know if this is working out for you in some way 😬!