might be a bit late to the party here but I've just spent 2 months in taghazout - the small surf town in south of Morocco. It's got a GREAT co working spot called sundesk (i wrote a review of it here:
https://hatsoff.world/sundesk-review) and there are also a few coffee shops where i used to do a lot of work... internet really isnt too bad (although I'd recommend buying a SIM card so you've always got back up data) but if you're looking for somewhere hot, where you can surf while working.... taghazout is a good option

(i cant say much for marrakech but it sounds a LOT more hectic!)