I occasionally have kept shrimp with cichlids if they are large enough.
But then if they are large enough to avoid being eaten, they may also turn the tables and eat the fish
The one above eating a catfish, was about 10" long and filled a 5 gallon bucket
But when cichlids find some shrimp to big and formitable to attack individually, they can sometimes attack em-masse, and dismember shrimp, like a pack of wolves
I like to keep shrimp in planted sump/refugiums, separate from cichlids, where they can keep filter media clean, by policing up larger chucks.
I use a 125 gal sump to filter my cichlid tanks, so thee is plenty of room to house a population of shrimp
I believe these are Macrobrachium crenulatum, but could be a number of species.
I catch them in almost all the rivers of Panama, from large rivers like the Mamoni, to small streams, where I live on the island of Taboga.
Where I catch them pH is always around 8ish, and nitrates undetectable.
They are consummate escape artists and can easily leave the aquatium.