Short answer: the four defaults keys, plus the one that matters most on a demo unit: contents-immutable, so the apps you are demonstrating are still in the Dock at closing time.
If you run more than one unit, set everything before you clone the image. Machines that drift apart are worse than machines that drift, because now the answer to "why does that one look different" is nobody knows.
On every other shared Mac the Dock drifting is an annoyance. On a machine that exists to sell something it is the pitch going wrong: the app you want people to try is not there, because somebody dragged it off three customers ago.
What actually happens on a display unit, in rough order of how often:
defaults write com.apple.dock contents-immutable -bool true
defaults write com.apple.dock size-immutable -bool true
defaults write com.apple.dock position-immutable -bool true
defaults write com.apple.dock autohide-immutable -bool true
killall Dock
contents-immutable is listed first on purpose. On a personal Mac it is the one people skip. On a demo unit it is the whole point: it is what keeps the apps you chose in the Dock and keeps everything else out.
Each grays out the matching control in System Settings. They survive a restart and a macOS update. Every key with its type is in every Mac Dock defaults command.
macOS adds a section of recently used applications to the right of the Dock, and the contents lock does not remove it. So a locked Dock still grows a tail of everything customers opened.
defaults write com.apple.dock show-recents -bool false
killall Dock
On a display unit this is not optional. More on it in how to stop recent apps appearing in the Dock.
This is the part that has no equivalent on a home or office Mac. A bank of display units has to match each other, and they drift apart one small change at a time until a customer walks down the row and sees four different Docks.
So the order of operations matters more than the settings do:
Anything configured after the baseline is captured lives on exactly one machine and is undone the next time that machine restores. That is how a row of identical Macs stops being identical.
If the units restore to a known state overnight, the same rule applies with more force: the locks belong in the baseline, not in the running session, or you will be setting them again every morning.
defaults command. Free, one line to undo, and enough when the Terminal is not reachable by the public. It is per account, so it applies to the login the demo runs in.All three compared, with what each costs: how to lock the Dock on a Mac, 3 ways compared.
Some display setups drive a second panel facing the aisle. The Dock is not assigned to a screen: it follows the pointer, and there is no defaults key and no System Settings switch that changes that. If a customer moves the mouse to the wrong edge, the Dock goes with it.
The workarounds and what each one costs are in how to keep the Mac Dock on one screen.
No. It stops the Dock's icons being added, removed or rearranged. What can be installed or opened is a separate matter and belongs to Screen Time or your management tool.
Only through the recent apps section, which is separate from the four locks. Turn it off and an opened app leaves nothing behind.
Only if a full trading day of drift is acceptable, and it usually is not: the Dock is worst in the afternoon, when the most people have used it.
Close, but a front desk is used by staff and only seen by customers, where a demo unit is used by customers directly. See a front desk or showroom Mac for the staff side, and a library or public Mac for machines with no commercial purpose. At home it is a family Mac.
No. They live in the account's preferences rather than in the system. A restore image will replace them with whatever the baseline holds, which is the reason to put them in the baseline.