I've analyzed this more deeply. The news are not good for such use case.
How a captive portal works?
- The client device generates automatically a http (port 80) request. This requests tries to load a remote URL through the default gateway for a unique (or quasi-unique) time.
- The request URL depends on the user's device type (Android, MacOS, iOS, Windows, etc.) or on the user's browser.
- The captive portal "captures" it and does its thing (present a web page with infos, etc.).
Consequence: an Internet connexion is needed for a captive portal to work.
Nodogsplash, OpenNDS and Balena WiFi Connect all function like this, and do not work when the router (say MoodleBox) has no Internet connexion, since step 1 above fails.
What about Kiwix hotspot?
Kiwix hotspot works around this in its captive portal when offline by faking a correct answer from the URL given by the user's client, a complex thing to do.
That's why Kiwix's captive portal works also when the router isn't connected to the Internet.
Is it possible to do this in the MoodleBox?
Certainly, but it is complex (see above) and needs a lot of programming and testing.
I'll open I've opened an issue for this, but won't be able to do this alone: I've not the expertise, nor the time to implement it.
I'm open to be sponsored for implementing such a feature.
Edit: See this issue on Github.