Database

db={"coll1":[{"_id":"K1","value":"VAL1","timest":{"$date":"2021-09-26T09:05:09.942Z"}},{"_id":"K2","value":"VAL2","timest":{"$date":"2021-09-26T09:05:10.234Z"}}],"coll2":[{"_id":"K2","value":"VAL3","timest":{"$date":"2021-09-26T09:15:09.942Z"}},{"_id":"K3","value":"VAL4","timest":{"$date":"2021-09-26T09:15:10.234Z"}}]}

Query

db.coll1.aggregate([{"$unionWith":{"coll":"coll2"}},{$sort:{_id:1,timest:-1}},{$group:{_id:"$_id",final:{$first:"$$ROOT"}}},{"$replaceRoot":{"newRoot":"$final"}}])

Result