Frame Saver is one example of an anti-rust product you can spread inside your frame: https://velo-orange.com/pages/how-to-use-frame-saver. Though as j4k3 mentioned these products are not perfect.
In reality, the rust in a steel frame isn't usually bad enough to make the frame unusable. The bigger problem is interfaces between parts. Seatposts love to get stuck in steel frames that have been left in the rain too long. Screws, too.
Aluminum, titanium, and carbon frames will not corrode significantly in wet weather. In rainy areas you will sometimes find people who have a winter bike in one of those materials, and save their steel bike for the drier months.
Plemmy is a Python library that might be helpful for building a bot: https://github.com/Fedihosting-Foundation/plemmy
Also this Lemmy API reference: https://lemmy.readme.io/reference/post_community-ban-user