I followed the official guide (from the Raspberry Pi people) for setting up a Pi as a WiFi access point.
It says:
With this network configuration, wireless clients can all communicate with each other through the Raspberry Pi router. However, clients on the wireless network cannot directly interact with clients on the wired network other than the Raspberry Pi; wireless clients exist in a private network separate from the network that serves wired clients.
From the linked guide, section "Enable Hotspot", it told me to execute sudo nmcli device wifi hotspot ssid $SSID to enable the hotspot/AP.
Then disable it: sudo nmcli device disconnect wlan0.
Change a connection parameter just for compatibility's sake and to make things easier on the client devices:
sudo nmcli connection modify $UUID remove wifi-sec
which disables encryption and authentication to the hotspot/AP.
Then bring it back up: sudo nmcli connection up Hotspot
This is all I did before testing with my phone. (and asking this question to see if anybody had any leads) Pi runs Raspberry Pi OS/Raspbian (whatever they're calling it now) specifically the one based on Debian 12/Bookworm. I updated everything to the latest version early this morning.
Output of uname -a: Linux raspberrypi 6.6.51+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux
The point is to have a WLAN for really old stuff with no way for data to enter or leave from an external network. That's all there is to it. Under no circumstances should internet connection sharing or bridging be enabled, according to the the guide, but testing reveals that it is enabled and there is no way to disable it. The reason for this is to keep said really old stuff safe from possible compromise from the internet. There's a reason everybody tells you not connect something running Windows 95 to the modern internet at all.
The default NetworkManager hotspot connection profile has ipv4.method=shared in it, which means it will forward outgoing requests to the internet. AFAICT this is a cross-distro issue. I tried changing this to ipv4.method=manual, mucking about with dnsmasq and other things trying to get NetworkManager to play nice with it, but was not successful.
Ideally, I'm looking for a known working connection profile and other information (depencies etc) I need to make NetworkManager create a plain AP with nothing else to it.