How is process of jailbreaking with locked bootloader done?
You need to OEM unlock the bootloader, which is either as simple as toggling a setting or as hard as getting access to cryptographic keys that are tightly controlled by the OEM (or developing an exploit that circumvents the need for those keys), depending on the phone’s OEM. Then you go into fastboot and either flash a custom ROM (if by “jailbreaking” you mean installing a custom OS) or a patched init image (if by “jailbreaking” you mean breaking out of the chroot jail on stock Android)
Can it be automated?
Almost certainly no, as that would require violating several major security boundaries that keep random apps (e.g. malware) from giving themselves root privileges and completely compromising your device. Obviously some devices are accidentally this insecure, and therefore lend themselves to automated jailbreaking, but you shouldn’t want that (for obvious reasons)
Although some steps can be automated—e.g. GrapheneOS only requires you to unlock the bootloader, and then takes care of everything else via USB thru their website (and a Chromium-based browser)








To be brutally honest, I don’t know. I’m not as familiar with the hardware ecosystem of that era. If I had to guess, I would assume they were probably using the same basic security model at the time, but you know what they say about assuming.
Are there any threads about unlocking/rooting/jailbreaking your device on xdaforums.com?