Please note that in Amazon S3, buckets and objects are the primary resources, and objects are stored in buckets. Amazon S3 has a flat structure instead of a hierarchy like you would see in a file system. However, for organizational simplicity, the Amazon S3 console supports the folder concept as a means of grouping objects. Amazon S3 does this by using a shared name prefix for objects (that is, objects have names that begin with a common string). Object names are also referred to as key names. So, there is no concept of “folder” in S3 and it is just a prefix to the full path of the object. More information on how objects and prefix structure work in S3 is mentioned in the following documentation below:
So, you would be able to lock only the objects in S3 using S3 object feature to prevent anyone from deleting the object. With S3 Object Lock feature you can specify how long an object remains locked, the retention period will specify the length, or you can use legal hold for indefinitely. You can find more information on Object Locking below. If you want to lock your objects in governance mode, then users can't overwrite, or delete an object version, or alter its lock settings unless they have special permissions. Also, the other mode, that is the compliance mode ensures that a protected object version can't be overwritten or deleted by any user, including the root user in your AWS account, so please be careful when using this mode.- https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
Also please note that S3 by default does not backup your resources if you delete something accidentally. However, to prevent accidental deletion, you could limit access to your S3 buckets using strict S3 bucket policies, enabling versioning, configuring Cross Region Replication, and using MFA delete (users need MFA to delete objects).
That is, enabling versioning on the bucket that needs data protection is a great way to ensure your files have multiple copies in case of being overwritten or being deleted . Another option you can take a look at is replication, this will replicate your bucket to another bucket in the same or even a different region. You can find some guides on replication here  . Please be aware that replication will not replicate current files in your bucket and only newer files. You can force replication on current objects via this guide .
Another option I could suggest is using MFA Delete, this requires you to install the AWS CLI  and then configure it . Once you have done that, you can then enable MFA Delete by following the guide here . MFA Delete will then require multi faction authentication before anything can be deleted.
It is also possible to restrict the ability to delete objects from your bucket, and the bucket itself, using a bucket policy. You could have a policy that gives one user the ability to delete objects when necessary, and grant only this user access to S3 delete permissions. For example: