usually if you start to see deteriorating flesh on a star it is a sign they are slowly dieing , and there is really nothing that can be done to prevent it ,
most sea stars don't do well in captivity most of them starve in a short time ,
a lot of sea stars have something called wasting syndrome and are dieing off by the 1000's , a lot of the stars collected for aquarium sales come from the affected areas of this syndrome.
Pacific Rocky Intertidal Monitoring
the only stars I know of that do well in captivity are serpent stars and brittle stars I have many of both these species in both my tanks , they are a very hardy species of stars ,