The shrimp will add more do your bio-load than the others but you should be ok with one or two. 5 shrimp in a 40 gal would be a bit much unless you have no fish. If you have fish...I would limit it to 2. Serpent stars are very cool but have ravenous appetites, especially the green serpent. They will also eat your fauna, which is bad if you have a DSB.
IME, the blue leg hermits are much more friendly than the scarlets. Scarlets get bigger and are little murderers. With that said...do expect a few hermits, no matter what breed, to develop a taste for snails especially for snails with similar shells like ceriths. Just the way it is.
IMO, hermits and snails are an absolute for a diverse and healthy ecosystem.
Good luck and have fun. :smokin: