Remote Development Workflow with remote Database and Git

As I am quite new to development and we are currently redefining some things, I would like to ask for your opinion:

We are currently working on our infrastructure and would like to enable our employees to access the respective httpdocs of the web server from their local stations.

The development would then be done via Git on the local stations. The problem that would occur is that the database connection would have to be redefined for each station.

If we then edit the wp-config file and change the variable DB_HOST to, the local installation accesses the database of the server. We would then have to change the database server and whitelist our IP addresses for development.

Would you recommend this workflow or do you have any other suggestions?

Edit: A better solution would be to continue working via Git but then log into the network via a VPN connection to access the server. This makes it possible to access the database only from the network itself and thus there are fewer points of attack.