Railgun is not going to be useful unless it’s accurate. They will need a guided projectile whose electronics will survive the acceleration, and the electromagnetic energy used.
Correct, and it requires the ship to become a floating generator to run it.