Help with a Taiwanese expression
It refers to 阿彌陀佛, the Amitabha Buddha.

You describe the colloquial usage of the term quite accurately.

Most of the time, the term is used not to refer to the Buddha itself, but to create comedic effect in speech.