Water and oil are both problem liquids. Water-based finishes (not water colors, which are inherently unsuitable, but acrylics, for example), improve their water resistance as they dry and cure, but they can often degrade if submerged in water for a very long time. Oil can affect the adhesion of the paint, and can break down some finishes over very long exposure. The model repeatedly moving through the liquid would also help to strip off any degraded finish.
The image used in the example looks like the colors are in layers. If that will mostly be the case, you could cast the model in layers using colored resin, which would avoid the problems of adding a finish.
If there are areas that don't lend themselves to that, you could paint those with colored resin of the same type, or another resin or adhesive designed to bond with it (you can add colorants to resins and adhesives). Use a material that integrates with the model, or forms a bond as strong as the resin, itself.
Using the same resin is ideal; otherwise, think in terms of materials that will weld themselves to the surface and can be made the color you want, rather than looking at paint or finishes designed to be added decoration. For example, there are some epoxies that are formulated to form a really strong bond with many plastic resins.
Use proper surface preparation. It can also help to include shallow recesses in the mold for the "paint" spots so that the paint spot doesn't have a raised edge.