At that time Martial came to Manchester United, he was an hot prospect everyone wanted him, sadly injury woes slowly kill the young lad, I remember when he was trending among new headlines before and after the transfer.
While Flamengo may look backward, showing is career is coming to an end I believe there's hope for him to do well and attract the eyes of European clubs again, remember Willian was still able to secure a move back to EPL even when he went back to Corinthians, which look as if his career was coming to an end at that time but still keep to Fulham and have a decent stat for his age.
I think the reason Flamengo did go for him was also from the fact that he is quite popular and that will definitely shift the media attention more to them after his signing. Though I hope he can do well and get his career back on track.
Martial is still a good player and the problem has not been his injury, the problem is Manchester United and their manager. No matter which player goes there, it ends badly. The best examples are Maguire or Antony, both were top players before they came to ManU who got into big trouble there. Even CR7 didn't last long at ManU, so you shouldn't look for the problem at the players. As long as the management and the coach don't change, it doesn't matter which players come, ManU will lack success.