Quick fix for 'Multiple Root Bones' (extremely complex hierarchy model)

So I have a file from a client that’s stumping me. It’s a complex mechanical system along with a mesh and skin (for only part of it). When importing into UE4 I’m getting the dreaded issue with Multiple Root Bones (exporting from Max and Maya is the same). I’ve tried to move any available bones under a single dummy - but still getting the issue. In general, the hierarchy is crazy complex - Is there a way to automate the process for exporting this? I don’t know what to do - every video shows manually moving bone hierarchies - but it could take days to pick through this always risking knocking the wrong hierarchy.

Not understanding the issue - and it’s a complicated enough system that I need some automation.

Any ideas?