Some of the older sites still offer some hints at where to begin long-sought replacement parts;
while those may have non-working secondary links ~ where content has now vanished!
https://lowendmac.com/1998/original-imac-rev-a/
rev-a/rev-b tray-load optical drives: 1998
May you have good luck with attempting to clean this antique optical drive.
This company used to sell an upgrade optical drive.
upgrade -to slot load G3 optical drive- from tray load:
• MCE Internal CD-RW Drive for Tray-Loading iMac
www.mcetech.com/imacrw.html
Theirs was an OK idea. Could maybe find one in hibernation?!☃️🌻
And their pages seem live; but stop before 'crucial page' loads.
My newer G3 iMac 1999 400DV was a great music player; also DVD movies.
Was given 'first-edition' G3 iMac -once- & passed that on to eager tinkerer.
iMac G3 Model M4984 tray-type Optical Drive Replacement
[..Takeapart steps: how to take out optical drive and put another in.
No links to parts: only hints on re-use of optical drive, once found..]