Since kernel 5.1 bcm2835_wdt (watchdog module) has had to be loaded 'manually' to make reboots work:
$this->bbcode_second_pass_code('', '
$ cat /etc/modules-load.d/bcm2835_wdt.conf
# required on rpi3b(+) for reboot
bcm2835_wdt
')
See also earlier thread:
viewtopic.php?f=67&t=12870&hilit=Reboot+failed+System+halted