it seems the interval value is hardcoded in the hw with 15seconds
The operations on the sdcard block the refresh of the watchdog, exceeding the 15seconds, triggering the restart. As a potential workaround I increased the priority for the watchdog, that is working ok so far.
Basically I was using 12800 instead of 1280 (@80mb-75 mb free) on the free memory check, so my pi 3b+ 1gb ram was rebooted due to that, 12800 means 800mb of free memory and i was below that value when I was playing around with the apt command. The final valid configuration file is: