if you have plain strings in your kafka records for K+V you use the StringConverter in the first place
Like you mentioned you then apply the HoistField SMT on both the K+V which will give you JSON for both parts of the kafka record in Connect
the mongodb sink connector would primarily focus on the value of the record and in addition you provide in the config how it should create the “_id” field based on a DocumentIdStrategy. In your case you want the “_id” field 1:1 as it is given by the result of the SMT for the key which is why you specify the ProvidedInKeyStrategy. In other words what you call “merge” of the K+V is done by applying the correct id gen strategy in this case.
That should do it! Look at the following config snippet that should give you the desired outcome. Adapt it to your needs: