There is a way to do focus bracketing automatically with a T5i, but it may not be as simple as you're envisioning.
Magic Lantern
Magic Lantern is a firmware add-on that runs on top of your camera's DryOS operating system, like programs being run from a hard drive. Only in this case, your camera's memory card acts like the hard drive. So long as your T5i is running firmware v.1.1.4 (at the time of this writing), you can load Magic Lantern and gain access to a lot of features written by open source firmware developer volunteers who were frustrated that their Canon didn't do things they knew it could with software.
Keep in mind, however, that this is nobody's day job. And there is, as with any firmware mucking, a risk of bricking your camera. It's up to you whether it's worth it or not. I've been using ML on my 5DMkII and 50D for about three or four years, never had anything happen to my cameras that swapping out a battery wouldn't fix, and I love it, but it's not necessarily for everyone.
Step Focus
Magic Lantern has a step focus feature in it designed for folks who do a lot of focus bracketing for stacking purposes. It works best with the camera on a tripod, and you do have to do the following steps:
- Set an end point for the focus range.
- Set a starting point for the focus range.
- Set a step size for the intervals along the focus range.
- Set which button will trip the shutter for the bracket set.
So, as I said, possibly not as simple as you were envisioning. But one press of the button you designated in step 4, and then the entire series of images is taken in succession.
If you've never done macro focus stacking before, you may be surprised by a) the amount precision required for macro focus stacking, and b) the number of images you'll probably need for a successful stack.
See also: this Youtube video demonstrating how to use the step focus feature.