This isn’t just icloud being arrogant. Many cross-platform file operations can break that metadata.
Yes, editing the creation and modified metadata is possible. On MacOS and Linux, you have the “touch” command. But you would likely need to write a script to automate that. Or read through these discussions to see if someone wrote something that can help you:
(Also check the threads that are linked to those threads. There are several. There may also be plugins that sort by YAML fields.)