I'd recommend looking under the Preferences > MIDI window at the MIDI I/O to make sure that the MIDI CC events are the ones you want. You can also switch to the Minimalistic MIDI I/O preset, which could reduce event collisions.
I do know on my system that the pedals within PTQ are counted from left to right, so Pedal 1 is usually the Soft Pedal and Pedal 4 is usually the Sustain Pedal.
I'm not sure why it's not working after the MIDI Learn event, and so diagnostics in the MIDI window should shed more light on the reason it isn't working correctly. The process you're using should take care of it automatically, so something else with MIDI events is probably involved. PTQ should be using the CC events rather than the listed pedal numbering within the interface or on the SL88; both numbering schemes should be arbitrary. There could be duplicate MIDI CC assignments which could be sending the event to some other parameter--particularly in Standard or Pro when using the Full-Featured MIDI I/O preset.
Spotify:
https://open.spotify.com/artist/2xHiPcCsm29R12HX4eXd4JPianoteq Studio & Organteq
Casio GP300 & Custom organ console