You will be able to check your luggage all the way from Casablanca to Newark. Lufthansa and United are closely related, and luggage transfers between them are not a problem.
If all three flights are on the same ticket then this will happen automatically - but it's worth checking the tags as they put it on the luggage to make sure. It should have a list of the airports you're going through - "FRA", "LHR" and "EWR" on it.
If the flights are on different tickets then be sure to have a printout of the flight details with you, and they will be able to check it all the way through - but you will have to ask for it! At a minimum you'll need the confirmation number, but it's worth having the full details (ticket number, confirmation number, flight numbers, etc)
You will be required to collect your luggage in Newark regardless of your final destination as it's your first entry point into the US, however if you are continuing you can still get the luggage tagged to your final destination in Casablanca, which will make re-checking it easier.
Lufthansa check-in staff in Casablanca will be fluent in English, German, as well as the local languages so you should not expect any language issues.
Neither Morocco nor the UK are part of the Schengen region, so your transfer in Frankfurt is basically an international to international transfer, and there is no need to go through immigration. 54 minutes is cutting it a little fine, especially as FRA has a habit of using buses to get passengers to/from flights - but presuming you're on time (and especially if both flights are in the same terminal which they probably will be) then you should be fine.