Is it necessary to take malaria medication when doing a desert trip?

No. The Namib is not a malaria zone.