Hi Juice and welcome
I don’t have exact answers for you but I use the Drag camera with pointer extension for camera panning and the Pinch gesture extension for zooming. Both work well but maybe not at the same time. I decided not to let that bother me but it might be possible to get them to work at the same time with the same gestures.
For the clamping, this formula was suggested by the author of the Pinch gesture extension: Camera Zoom limit - #9 by davy It works well for me, but does not achieve exactly what you want.
The Pinch gesture extension doesn’t seem to work with the Save states behavior though as mentioned by me here a few days ago: Pinch Gesture extension not working with Save states