Yes, you could do this, but only if I interpret your request literally.
A Linux system gives full and unrestricted power to the root user. In fact, if UID == 0, most security checks are simply bypassed entirely. There is nothing root can't do and that's by design. So any locks you put on anything, you can also remove.
So how to do it?
The first answer is that you could manipulate the kernel. In whatever fancy or simple way you want, the kernel source code is available, and you could, theoretically, add code to it that creates locks that cannot be unlocked, even by root. It could be a special file by name or inode, or a special UID, anything you can fancy.
To get at your data, you would have to build and install a new kernel. If that is a sufficiently high hurdle for you, I would consider it "I want to make it so that the only way to change it is by building my whole OS from ground up".
The second answer is that someone already did that for you. Turn on SELinux, define a policy that secures the file or folder you want to protect, say by giving nobody write permissions, then lock that policy by removing all permissions to change the policy, then turn on enforcing mode and likewise lock it in. Congratulations, you have locked yourself into your system. No SELinux permissions can ever be changed again. You will have to reinstall a different kernel, and if you've taken those permissions away as well, you have to do it from outside the system.
(I don't recommend doing this. I've been part of SELinux development in the early days, and I can't count how many times I had to reboot because I locked myself out of my system - and that system booted into permissive mode. If you make a small but significant mistake in your policy, you can go and reinstall.)
Now that is the literal interpretation. If you are looking for a time-based solution, such as "I want to lock this data away for at least 5 years" then you are looking at things like https://crypto.stackexchange.com/questions/3064/is-it-possible-to-make-time-locked-encrytion-algorithm or https://stackoverflow.com/questions/11416803/time-based-encryption-algorithm -- which, to cut right to it, all require a third party in some form, but don't necessarily require you to store your data externally.