There was a time, closer to the initial release of the Nintendo Switch, where third-party docks were causing console owners to experience massive issues with their devices, even bricking in them in some cases. Now, multiple years after release, this is extremely rare and most Switch docks are safe to use with your Nintendo console.
There are some harmful variants out on the market though so do be careful before purchasing.