Recently, travellers applying for Mauritanian visas in Morocco were obliged, I recall, to show an airline ticket proving they could leave the country.
Having obtained the visa they then went back to the airline office and cancelled the flight!
Saucy perhaps, but widespread practice.
There is absolutely NO chance of getting anything at or near the Mauritanian border.
In 1996 I employed Hogg Robinson, London SW1, to obtain my Mauritanian visa at Brussels.
The visa cost £140 and Hogg Robinson charged me £30 for doing it all. No queues, no hassle, no grief, and worth every penny, I would use them again.
With the number of visas you propose (was it really 40?) I would have an agent do a deal for you, both with the Mauritanians and with their own agent's fees.
Good luck Kitmax