When I used to have a Samsung 3 phone you needed to use Odin to flash stock, which I have only seen for Windows. I think if you can put your phone into bootloader mode, when you press power+ volume down + home button (I think), then you should be able to fix the phone. There is something called heimdall https://glassechidna.com.au/heimdall/ Try this. Read the info to check compatibility.
I have an old S3 mini someone gave me but never really used it. I've never unlocked and flashed it.
Let us know if it works out!
The device is for sale now, but Replicant isn't supported on it yet. I think work is underway to support it though. Other distributions are currently supported, but I don't think any have been certified to meet the FSF's FSDG, like https://replicant.us has.