SKevo exactly. It's probably not too complicated to implement, the permission part would work similarly to Suspend and Terms.
But the real question is the purpose. If the intent is to be able to work on or backup the database, then you also need to neutralize online status, login and post read requests, otherwise those will continue to be written to the database.
If the intent is to update composer dependencies, then nothing can really guarantee the website will stay up, as any PHP error or missing file will throw errors. For that you'd need a read-only copy of the forum that's also served as a temporary static website while Flarum files can be moved around behind the scenes.
To pull this off properly would require two different Flarum copies so one can be put in read only mode while the other can be modified. But this probably only makes sense for high traffic websites that need to keep content accessible with minimal downtime.
For most small forums, the base "offline" mode of Flarum is probably enough to make sure nothing gets interacted with until maintenance is complete.