I have the same problem. Unfortunately, I did not find any solution around.
I tried to develop something on my own. It is not very elegant, but it works.
With the following code you can extract the ID of the "small" polygon together with the ID of the largest neighbour so that you can then merge them:
SELECT id_small_poly, id_large_poly FROM (
SELECT
a.id_poly AS id_small_poly,
b.id_poly AS id_large_poly,
rank() OVER (partition by a.id_poly order by st_area(b.geom) desc) AS rankx
FROM
(SELECT * FROM TABLE WHERE ST_AREA(geom) < 10000) a,
(SELECT * FROM TABLE WHERE ST_AREA(geom) >= 10000) b
WHERE
ST_INTERSECTS(a.geom, b.geom)
) x
WHERE rankx = 1;
Once you know the polygons to be merged, it is trivial to update your table (e.g. you update the geometry of the large polygon as the ST_UNION of the small and the large polygon and then you remove the small one from the table).
I used the largest area, but you can adapt and take the adjacent polygon with the longest common border.