I finally managed to calibrate my controller correctly. To do so I ended up using jscal.
When changing the calibration here, they are also updated in the systems settings.
Exactly what the values mean is still somewhat of a mystery, but it works.
jscal -s 6,1,0,30767,30767,20500,21000,1,0,32767,32767,20000,21000,1,0,31767,31767,20500,22000,1,0,35767,35767,20500,21500,1,0,0,0,536854528,536854528,1,0,0,0,536854528,536854528 /dev/input/js0
You can also remap the buttons.
jscal -u 6,0,1,3,4,16,17,16,305,304,307,306,308,309,310,311,312,313,314,315,316,317,318,319 /dev/input/js0
These values are for a Nintendo Switch Pro Controller.
I am still not sure how one would save these settings.