How to flash a custom rom solely with a PC

So long story short, I have a old Samsung S Duos. It fall from some height. Its screen is broken. After giving up on it and almost a year after that, I decided to charge it and unlike last (year) time, it just decides to boot up. I plugged in a usb and it works, but the screen is still off. The touch is completely broken.

Now, I want to enable adb on that but its nearly impossible. So I was thinking of flashing a rom on it with adb debugging enabled by default. The phone is already running on some rom (idk which one, my brother flashed it) and I would like to know if there are any roms available that can do this.

TL;DR: I want to flash a rom on a phone that has no input so I can enable adb(by flashing a custom rom with adb enabled by default) on that. Is it even possible?