Back around 2003, when Firefox was called Firebird, I did some major surgery on the UI's XUL code to make a specially tailored kiosk-like version which ran on a dedicated Linux computer with a minimal window manager (MWM), but no "desktop". (Running Linux with no desktop made it hard for users to cause any problems that couldn't be fixed by a simple reboot.)
The purpose was to provide a museum exhibit. It had no Internet access, but could only display the contents of onboard HTML files -- and play MIDI of historical music. Many other operations, like Open, Save, Print, New, Preferences and Quit were removed, and every page had a 5 minute inactivity timer (via JavaScript) that went back to the home page (which was animated).
This was pretty straightforward to do in XUL (I did it in my "spare time"). I doubt if any *custom* lockdown like that is practical now, given that Firefox has been "improved" by the complete removal of XUL.