As the prove of concept at help.openstreetmap shows, is possible to generate an OSM's dump with all elements with a Wikidata tag.
Ideal is by relation mask, for each country or each country's states.
[out:csv(::type,::id,wikidata,name)] ;
relation (_MASK_RELATION_ID_) -> .c ;
.c map_to_area -> .myarea ;
(
node (area.myarea) [wikidata];
way (area.myarea) [wikidata];
relation (area.myarea) [wikidata];
);
out meta ;