Are the monkeys in the square ethical?

The short answer

No.

Barbary macaques are endangered primates taken from the wild as infants — mothers are driven from the troop, sometimes killed. The babies have their teeth pulled or filed, are dressed up, chained, and used as photo props. They are listed as Endangered on the IUCN Red List, and capturing or trading them is illegal under Moroccan law and CITES. Every photo taken funds the next capture.