The higher purpose of this is: speed (one database for the several
restaurants would be slow)
fortunately, this is not a problem. at all.
You are not building a space shuttle to go to the next room. Make a simple step maybe few steps.
Magento easily separates categories and products per store/website view. This is builtin feature.
To prepare for the expected traffic or in general for the load, you need to build your shop in the cloud.
Your first problem will be php, not database as you think. Auto-scalable solution to launch multiple instances to process
php requests - is all you need at this stage.
The solution that I've thought is to have the homepage in one server
and several other servers with one Magento installation for each
restaurant. But this would be insane.
this is not insane - this is correct approach. you can build auto-scalable solution to proxy backends per domain, magento action/route, or even per user cookie/action.
this is exactly how it works. you dont have to install magento on every server, you just scale-clone its core files. as media and other static / sessions will be shared.
Only after you see that you have steady traffic and database IS the problem, you can go with separation, read/write , proxysql, pxc cluster, there are lots of tools ready to help you with this.
you can simply clone your database and using proxysql create read/write, or master-slave cluster in sync.
but this is impossible to share anything here, because we dont know your environment, shop settings and your DBA management skills. for this you have to start from percona page:
and proxysql page:
or probably you go with AWS Database configuration, they have some options to manage replicas and db-scaling.