Yes - you can definitely do that. Two things you must keep in mind:
The RPi and the external battery-powered hardware must operate at a common reference potential. This is easily accomplished by connecting the two GROUND points together.
RPi GPIO pins are biased at 3.3V, and they are rather fragile. You must properly interface them to your external ...
In general, yes this is possible.
You must connect the grounds of both power supplies together at some point.
You must also make sure that no 5 V logic signals that come from your 5 V logic are connected to pins on the Pi, as this can permanently damage the Pi. There is no danger of damage if GPIO outputs from the Pi are connected to logic inputs in the 5 V ...
This has NOTHING to do with the Pi.
This is a common issue with unearthed devices. TV and other audio/visual devices are common offenders.
The official Pi supplies (also virtually all plugpack supplies) are Double Insulated. This means they float WRT earth.
It is possible (probable) that there is some capacitative coupling from the mains to the (nominal) 5V/...
"However, as far as I know, the Pi can only be powered via USB C" "The Pi needs to be able to draw at least 3 amps" - I wonder where people get these alternate facts or why they choose to believe them rather than the official documentation.
It is certainly possible; I run most of my Pi from a single supply.
That is not to say there are ...
You CAN power external components; indeed for some this is recommended.
It is (generally) essential to share Gnd connections (opto-isolated devices are a possible exception).
There is actually no need in this case, as the Pi 5V can easily supply the current needed by 2 relay coils.
HOWEVER if you are using a relay module similar to that pictured they are ...
you can make your own battery bank - what is needed:
a LiPo battery 3.7V
5V charger for LiPo (it will allow to charge your LiPo as well as it will deliver power to the next stage) - output voltage of this charger varies depending on the LiPo state - from around 3V to up to 4.2V (as per the requirements of the LiPo in its charging stages)
boost DC converter: ...