Maybe you could cut 5mm pieces from the old shafts and insert them first inside the knob caps, then put on the caps?
Great idea!
I did just that and it works perfectly!
It took a little time to find the right length, but now it fits great.
I had to cut the shaft to 9mm (startet with 5mm, then added chips +2mm, +2mm) until it finally fit like the originals.
The discrepancy comes, because I don´t think that the original encoder stops the cap with it´s top, but with the little step on the bottom of the shaft.
But with this method you can make the Bourns PEC12R-4025F-S0024 work.