This could be done via an addon, I don't think we have a getty in some addon though as that is an extremely niche usecase (building your own image and enabling the busybox getty applet and providing systemd unit files to enable it would be another possibility).
Keep in mind that a password on a serial console provides rather low additional protections. Once you have physical access to the device to hook up a serial console you could as well just take out the SD card and do everything you want (reading/modifying the data, enabling debug shell etc).
And if you go to the effort of securing physical access to the SD card you could as well secure access to the serial console pins - eg by putting everything in a metal box with a lock.
so long,
Hias