I rather think that Barbarian Scouts should not be able to pillage trade routes. It makes no sense thematically, and it's pretty unnecessarily annoying.
If however your Trade route runs into a raiding party, then the outcome of that should be that the trade route is pillaged.
And I mean, attaching a military unit... what's the expected outcome of that? A few weeks after that is possible you'll be sitting here, complaining not only that your trade routes still get raided, but that you're now also losing a military unit when that happens, because if a trade route that's protected runs into a raiding party both of them will surely die. The solution for that is to, as others have already stated, choose your targets in a way that doesn't lead them through dangerous terrain. Internal is currently the stronger trade route type anyway, but if you want to send them to foreign Civs make sure the path is guarded.