I know that a lot of it simply comes down to lots and lots of practice. But in a piece like Chopin's Fantasie Impromptu, I will eventually reach a point where I can play the left hand with no mistakes at full tempo and I can play the right hand with no mistakes at full tempo, but playing them together will cause the polyrhythm to break. I know this from experience just trying to sustain a polyrhythm. 2:3 isn't that hard to sustain. But 3:4 is very hard for me to sustain.
I have no problems when the polyrhythm is shorter than or equal to a bar like in this Chopin Nocturne that has a few moments of polyrhythm:
In the case of such short polyrhythms, just practicing the passage with the polyrhythm in question or practicing the piece in general will get me from struggling to play the polyrhythm to playing it just as well as I can the triplets in the Moonlight Sonata. But as the polyrhythm gets longer in duration, this becomes impractical and even impossible, as there is so much of the polyrhythm.
When that is the case, that the polyrhythm is sustained for a significant portion of the piece, I can usually play the polyrhythm right for 1 or 2 bars, but then, even at slow tempi, this polyrhythm will decompose by either my right hand slowing down or more frequently, my left hand speeding up. This is especially the case if the polyrhythm is 3:4 as in Fantasie Impromptu, or more complex. With the 3:4 polyrhythm, my left hand just naturally wants to play at the rate of sixteenth notes instead of eighth note triplets.
So how can I make it easier on myself to sustain 3:4 and more complex polyrhythms?