After some light research, I had a short session of compressing pianos and keyboards that I had recorded in previous sessions.
It seems that pianos are made to already have a good balance of attack to sustain, especially when using samples as these are often key considerations when choosing samples that fit a song. Therefore, it seems that piano compression is more about simple controlling the level of the piano on a broader time frame, and making sure that it doesn’t jump out of the mix too much. Low compression ratio and low threshold can work quite well at “smoothing” the sound, but can sound a little un-natural. I seem to prefer the approach of setting the threshold to just catch the problematic peaks, and setting the compressor with a slightly higher ratio (maybe around 3 or 4:1) to just pull down those “jumpy” spikes, with an attack time that allows the preservation of the transients. Release time seems to be dependent on the material, and should be set to “groove” with the track.