How can I close a remote controller switch with an optocoupler and a Pi?
Aside from an appropriate ballast resistor in series with the led side of the optocoupler r = (3.3 - Vf) / If), yes, that should work.

That post had a remote powered by a nine volt battery. Nothing really changes as far as your concerned with a 3 or 5 volt remote instead.

A relay will work too. The contacts of the relay should only have a negligible resistance (near perfect conductor). But then you have an issue of driving the relay, as the gpio cannot do it directly.

An optocoupler is ideal. But you could just use a simple npn transistor (2n3904). You would have to connect the grounds of the remote and the RPI together.