Is there some sort of software that can accomplish this?
Yes. Canon's "EOS Utility" will let you do this.
Another simple way to do this is with a remote release that has a built-in interval timer (aka "intervalometer") which is a timer that can control the shutter in bulb mode (and other modes) to take a series of long exposure images.
You mentioned this is for use in astrophotography. There are a number of other applications designed specifically for astrophotography that support this as well.
You may want to look at:
- Backyard EOS by O'Telescope is popular (Windows only).
- AstroDSLR should work (mac only) but do their free trial to verify your model is supported before buying. (I've only used this with DSLRs ... not with any mirrorless models, but they use the Canon EOS SDK which should work regardless.)
There are many other examples but these are two that are specifically design just for dealing with astrophotography and DSLR & mirrorless cameras. There is actually quite a long list of applications, but most of them are able to orchestrate everything needed to control an observatory while also controlling the image acquisition process (i.e. they may be more complex than your needs at the time).
What's so special about them?
There are a number of special techniques used in astrophotography -- especially if the camera is connected to a telescope and the telescope is mounted on a computer-controlled mount.
- They allow sequencing of the "light" (normal exposure) frames but also allow for sequencing and organization of special calibration frames such as "flat" frames, "bias" frames, and "dark" frames.
- They coordinate with auto-guider software to control telescope moves for dithering (used to help reduce/eliminate noise) and drizzle (used to improve resolution)
- They typically include special features to help with focus by leveraging techniques to help improve focus accuracy and may integrate with auto-focus systems for telescopes that have motorized focusers.
- They may integrate with plate-solving software to help accurately center the telescope on the object of interest. These objects are usually too faint to be seen visually.
This may be ... almost overwhelming for someone who only asked if there is software that can control the camera for long exposures. If you are connecting the camera to a telescope, you'll benefit from learning about these special techniques used in astrophotography (specifically how to "auto-guide" during image capture) and also how to do "image stacking" (image calibration and integration) to get much cleaner images.
If you are not connecting the camera to a telescope, then using a remote shutter release for your camera that has a built-in "interval timer" will certainly be easier and/or use a computer running EOS Utility to control the image capture sequence of long exposure images.