I would think it would be ok to have a single apisto in a 5 gallon, but any more than that and they're going to be fighting over territory -- they like to stake our their own space.
I've got a pair in a 6 gallon right now, but I'm preparing to move them into a 20 gallon. And even though it's a pair, and for the most part they get along fine, every once in a while the male will chase the female and she's got really nowhere to go, so she ends up hiding in the back behind the plants. Not really fun for her.
As for tankmates, from what I've read they should do well with other fish (unless they're spawning, and again it's that territorial thing). I've just got a couple of ottos in there with them right now.
Apistos are just like Rams, except not as agressive... i advise you to keep no Cichlid in a 5 gallon tank, as it is not right... The fish needs to be in groups of 4 or more to feel safe, as they are in the wild.. Being alone in a 5 gallon will not only stress the fish out, it will not be like a real life situation.. i suggest 4 in a 20.. NONE in a 5...
I agree on keeping rams/apistos in a 5g isn't a good idea. I have a 5g for a quarantine tank. It's actually more of a holding tank. I throw the new fish in there, any that look sick I take out and throw in a little 1g quarantine I have cycled. I have noticed that some fish just are lethargic when they are in a small 5g. Only fish I haven't seem really mind being in a 5g is a betta and some white cloud minnows. I do have 2 small zebra loaches in this one 5g right now though and tey don't seem to mind it too much. I would never even dare thinking about putting apistos or rams in a 5g.
It's possible to keep apistos in 5-gallons, but I only do it for grow out purposes and only for certain periods of time (makes it easier to feed them).
10-gallon is about as small as you wanna go especially if you have any intention of housing a pair/triplet. This would be comfortable for the smaller species, such as A. borelli. For rams, I would definitely house them in something bigger than a 10.
As far as shrimps go, the Apistos haven't touched them yet (keeping cherries and amanos with A. borelli, maciliensis mamore, and nijsseni), even when they're extremely hungry :icon_redf .