Using Fargate is saying, I don't want to deal with the instance. This includes things like instance patching, etc. Those things are done by cloud provider. In some cases, that is perfectly fine. Hopefully, this is meeting your current requirements. You will be able to deploy code as needed, but you don't control the instance itself.
If you want to use Fargate, set the minimum count to 0, desired to 1, and maximum to 1. This should keep only one instance available and scale out to zero instances when there is nothing to process for cost savings. Please note some latency when spinning from 0 to 1 instance.
If the instance becomes unhealthy, it could spin up a new task before terminating the unhealthy one. Please read for more details:
https://aws.amazon.com/blogs/containers/a-deep-dive-into-amazon-ecs-task-health-and-task-replacement/
A thing to note, that if you're automatically having AWS terminating and starting up new instances, the underlying process that is running should be able to handle this and start over where is left off, so it needs to have checkpoints and be able to figure out where to pick up if it was terminated. Remember, the cloud provider is doing this for you, and it could occur during processing. There can also be false positives as well.
Another option is using Amazon Spot Instances. Just spin up a spot instance and let it do it thing. Some simple monitoring can tell you if it's not healthy and needs to be stopped or terminated. This is a nice solution if you have sporadic and/or infrequent processing needs. If this is a process needs to run all the time, a standard EC2 could also be used. There are many choices to choose from for the type of instance. Health monitoring can be used to stop/terminate/start instances as needed by setting up alerts. No need to keep other servers waiting around. In that case, you will control the instance and start and stop it as needed. It could be on a schedule if you know that processing occurs at certain times of the day. If you have specific OS/patching/software requirements EC2s can be a good choice as it allows one to completely control the instance.