This is a cut paste from the latest update email from @dan. I can see how to restrict access to folders (thanks @ben) but this implies you can set per item (in shared folders) limits so a user can only edit their own .md item.
Have I misunderstood or can I not see the setting?
You haven’t misunderstood. Per-item editors are set on each item rather than on the folder, so they’re easy to miss.
Sign in as an admin or owner and open an existing item in the shared folder. The setting isn’t available when you create a new file.
In the Metadata column on the right, turn on Limit to specific editors.
Add people in Search editors, then click Save Changes in that box.
Editors who aren’t on an item’s list won’t see it at all, so each teacher only sees their own profile. Folder access still applies too, so an Editor needs access to the folder as well. You’ll need a valid licence for this.
Screenshots below. If you don’t see Limit to specific editors, let me know which version you’re on