switching 3A/5V with an optocoupler
If there aren't any such optocouplers, just build your own:



The actual optocoupler needs to pass very little current because it controls only the gate of the MOSFET.

Choose a logic-level MOSFET that switches on completely at VGS=−5V, and has a low enough RDS(on) for your application.

In this circuit, the optocoupler activates the switch. To invert the logic, exchange IC1 and R1.