Before you dismiss St Thomas you really should give it a calm and slow read.  He covers all types of law, and law itself.

Law comes from God; it reflects His internal order and mind.

Thus any law, if it is a true fragment of the eternal law, must be rational, reasoned, connected, coherent with other laws, etc.

Law must serve the true common good.

Law must be given by someone or entity with proper authority.

Law must be promulgated, communicated; it can't be hidden and then sprung on someone.

Dismissing St Thomas out of hand as you do is an injustice.  More thought an study and prayer is called for.