I edited the answer to make it clearer.
I think む itself does not seem to have this functions (反語). But it is often used in rhetoric questions, which may make it sound like 反語. Such sentences often contain か or や. If you check the dictionary, you will find か and や is said to have this function too.
One explanation is that it's misleading to say む has the function of 反語 because itself does not have this function. It acquired the 反語 reading when it appears as a part of 係り結び, that is
NTか 笑はむ (疑問) The 疑問 function of か requires む to be in 連体形
NTかは笑はむ (反語) The 反語 function of かは requires む to be in 終止形
The fact that む's 連体形 and 終止形 are the same leads to the misunderstanding.
However, this explanation has two problems:
Both か and かは require 連体形 when used as 副助詞 and 終止形 when used as 終助詞.
Both か and かは have 疑問 and 疑問 functions.
In addition, む is not required to enable the 反語's reading in this constructions. No matter む appeare or not, you always need the context to decide if a sentence is 反語.
To conclude, it's hard to say that this type of む has the function of 反語.
I think the excessive use of む for 反語 might be an influence of 訓読. Chinese definitely has more rhetoric questions than Japanese does. When they are read in the Japanese way, except a few exceptions, most of them are rendered as んや. If you write an article in 漢文調 style, then it will be likely that you use んや for 反語.
Chinese rhetoric questions often contains certain adverbs, such as 安, 敢, 豈, etc. Just like 係り結び, when you see these adverbs, the sentence must be ended with んや. When you see them, the sentence is almost 100% 反語.
Examples for your reference:
觀百獸之見我敢不走乎
百獸の我を見て敢て{あえて}走らざらんやを觀よ
燕雀安知鴻鵠之志哉
燕雀安んぞ{いづくんぞ}鴻鵠の志を知らんや
臣以弑君、可謂仁呼
臣を以て君を弑す、仁と謂ふ可{べ}けんや
子曰、其然。豈其然乎
豈{あに}其然しからんや