I think the big problem is that most maggots are going to be found in some foul stuff... And even if you wash them well, they are still going to be full of nasty stuff.
However, maggots don't have to eat foul things. You can raise them on cleaner food without much risk. I know that for fishing bait, people will catch them with melon slices, and raise them on that so that they are "clean".
If you can get clean maggots, they are supposed to be really nutritious and full of protein.