In order to answer this it is important to understand the differences between paint, waterbased stain, and oil stain. Paint and waterbased stains are effectively the same thing - topical coatings that seal the surface of the timber. Waterbased stains are just thinned down acrylic paint that allow the grain of the timber to show through but they block up the pores of the timber the same as paint. Oil stain is a penetrating product that needs to soak into the surface of the timber to provide nourishment.
It is not possible to apply oil stain over paint (or water based stain) unless all of the exiting coating is fully removed. This is because the oil will not be able to penetrate through the coating. The only way to remove the paint or waterbased stain is to use paint stripper (or mechanical sanding if the deck allows that). Both of these processes are time consuming and expensive, and may not remove all of the existing coating.
The result of this is that the new oil stain may be patchy, and may not last as long as on bare timber. Our recommendation is usually to recoat the deck with the same product that was previously applied. In the case of water based stain, this can also result in a patchy finish as the fully stripped timber will soak up more product than those areas that still have some residual product on it.
We can only do our best in this situation. The only other option is to replace the deck boards with new.