i suggest the following procedure:
try disabling hotspot and wireless package to free ram memory, then reboot to leave the device "fresh" (max free memory available)
only copy the packages needed to establish the remote connection in your case maybe system, ppp, security, and do the upgrade to new version
then upgrade base firmware in system ---> routerboard ---> upgrade and reboot
when upgraded successfully then add the needed packages only and restore the missing parts of your config
in some cases i have success restoring .backup on updated device if the needed packages are present
this can be specially problematic with hotspot configurations and complex wireless configurations, but is the only way i have found to upgrade remote hap lite and hap mini devices
a hassle procedure derived from scarce storage and ram memory (16mb of storage and 32mb of ram)
i think this problem are worsen with every new version, you can see the free storage and ram memory with each version is reduced
i think maybe is the price to pay to have so cheap routeros devices (half the price of 64mb of ram devices)
the long term solution is to replace hAP-Lite with hAP (full version) and hAP-mini with mAP, then you have 64mb of ram to make upgrades without problem
This solution works if you have installed the packages separately before. Disabling bundled package won't be possible in his case.
Also if packages has been installed separately, disabling some of them - will help with upgrade but it clears NAND space. Packages does not save to RAM memory.
I suggest the option with backing up the device before clearing the device "files" and some config ( so you can still access it remotely ) and rebooting twice( one reboot does not clear cache and leaves some stuff on the device, second reboot somehow clears it ) - and installing the new .npk
New RouterOS versions also has removed some packages so upgrading would be easier and such requirements would not be required to upgrade the device.