If you search for "toilet tablets" you'll find a range of products designed for this purpose, with tank cleaning as a side effect of cleaning the bowl.
Many of these products include bleach, like the Clorox brand.
These have been around for many years and toilet manufacturers are well aware of them. You'll hear about how bleach can damage the rubber flap in the tank or the plastic parts in the fill valve, but manufacturers have replacement parts that aren't affected by bleach. If you have an older toilet, you might eventually have to replace these parts because of bleach, but it's also likely that you need to replace these parts anyway simply because of age. They are user replaceable parts for a reason.
Toilet tabs are a safer and longer term solution to a single application of bleach. With the tabs, you can cut the packaging and drop in the tablet without touching it or risking spilling anything. With bleach and a measuring cup, there's a much greater chance of spilling. And with the tablet, it stays in the tank until it's eventually used up, where the bleach is 1 and done. The tablet is also safe enough for normal use, while straight bleach may still cause burns or a reaction on "sensitive parts" even when diluted.
I've used a variety of these tablets for probably a decade or more and haven't had a problem. I tend to go with the ones with bleach and don't color the water. I've only had to change 1-2 flappers in all that time, and they are inexpensive. They are really easy to replace, too. I've also only had to replace 1 fill valve, and that was obviously old before I ever put in a bleach tablet.
I have seen rubber seals on the bolts holding the tank onto the body of the toilet dissolve into the water and crack, but again, that was due to age of the toilet. Those are fairly easy to replace and also have bleach resistant options.