This helped me out with my problem.
https://www.justanswer.com/electronic-musical-instruments/84nzv-technics-p30-digital-piano-sounds-sustain-pedal.html
I used the sustain pedal that came with the Casio CDP-100, and instead of using rubbing alcohol to clean the pin, I used a dry tissue paper. After about 5 times or so, putting it in, wiping the pin, pulling it out and putting back in, the sustain pedal work.
I then cleaned my other sustain pedals pin with the tissue paper, put it in and put it in, and twisted it a bit as I put it in, and it also worked from then on.
I hope that helps.