The dom here is akin to the English doom, which has the basic sense of "judgment" (e.g. compare judgment day and doomsday). The -are refers to one who does something regularly.
It's also akin to deem, another word for judge (as in: "I deem it unlikely"). Judges on the Isle of Man -- where the parliament is known as Tynwald (from the Old Norse Thingvollr, "assembly field") -- are officially called deemsters.
This sentence was a bit tricky for me because in Croatian (my mother tounge) "domar" means "janitor". False friend word indeed
What, really? According to the Croatian dictionaries I have looked at, domar (janitor, custodian) does indeed come from dom (home, house) +-ar.
domaren looks/sounds like domoren in dutch. Which means silly/dumb person (usually jokingly said to a child, so not completely interchangeable with idiot)
A fun way to remember it, since this so far is one of the few words (also läkaren) I don't recognise as a similar word in the languages I know.
(ps before pressing post, I looked up the etymology, I see now that doom is related, dom means doom or judgement. Guess I have found another way to remember it :) )
(pps apparently for spanish and italian people it shóuld be a recognisable word)