After pairing Mac mini 2018 with Magic Keyboard and Magic Trackpad (old gen. with batteries), bluetooth started to become unstable more and more often and at the end it disconnected and reconnected every minute. I tried a lot of suggested solutions as to disconnect USB peripherals, switch off other bluetooth devices, remove metal object and remote controls, regenerate bluetooth.plist.files, use the debug to remove bluetooth devices and reset the bluetooth module, reconfigure and re-pair trackpad and keyboard but nothing solved my connection issues.
At last, I tried to do a reset of System Management Controller, a Combo update and, at the moment, it seems to be effective