No, you are right to be concerned.
An official Apple tech from the Apple Store or an Apple Authorized Service Provider no longer asks for a user password for performing any repairs. The only time an Apple tech may ask you to unlock the device is when you are standing right there with them and enter the password yourself so you can observe everything the tech does to your device while it is unlocked.
You should never give your password to anyone. A password is considered private & personal information.
If the tech needs to reinstall macOS, there is no reason for the tech to require your password since the system can be reset without any passwords.