I followed the instructions listed on https://www.mediawiki.org/wiki/LuaSandbox to manually install luasandbox, and it doesn’t seem to work on php 7.2 or php 7.3. When I added extension=luasandbox.so to my php.ini and restarted, in the log I found the below error.
PHP Warning: PHP Startup: luasandbox: Unable to initialize module Module compiled with module API=20160303 PHP compiled with module API=20180731 These options need to match in Unknown on line 0