Couldnt military intelligence take over the role of investigating Domestic terrorism By foreigners?
Not under current law, and Mil intel doesn't do 'investigations' domestically or law enforcement roles. They function as collectors and analysts. MI's role is to support operations, without operations current or planned there is no focus for the MI's collection efforts. Military intel does collect on strategic objectives and produces products for future ops that may or may not ever be undertaken, targeting and Order of Battle (OOB) for instance all the time. When the operations is 'on', the planners obviously want to know how current the intel is and the reason for the confidence level of the of the collectors/analysts (sources/methods).
In the military no one is worried about proving a case. All they want is a successful op (meeting mission objectives/minimizing risk to friendly forces.)
The objectives of military and LE operations aren't really compatible as the outcomes aren't accomplished in the same manner, nor are the legal precepts governing them the same .
The FBI when it operated legally and properly has different priorities than the military does. Changing the way the mil does intel to support LE efforts (assuming the law changes) would hamper its real mission which needs to be focused on current/potential conflicts.
Nothing screws up domestic operations in support of LE more than the introduction of a lawyer. The Law of Armed Conflict (LOAC) is the legal guidance for historical military operations and all planners and executors of those plans do or should know those constraints/restraints.