If you need to go to these steps to make optimizations, would it not make more sense to switch to a more bare metal programming language such as Rust for the entire stack?
Only if you are okay with maintaining two separate and evolving codebases until Rust one catches up to Ruby one used in production. But who knows how many months or years that may take.