Pi => Nano => MAX7219

A high-side power switch module like this could work for controlling a 5V pin:

Look into this: