Later after you have lots of users and your hosting costs are rising, then you can rewrite it in a language that gets you closer to the machine. You won’t need to do any exploration at that point, and you’ll already know where the performance hot spots are. Of course I recommend Rust for that, but that is merely my personal preference.
But there is a "dead middle".
If you have a big cash flow to go with "...lots of users and [rising] hosting costs" then, yes, you're spot on
But if there is insufficient cash flow then costs are rising and you are a bit stuck.
But it wasn't.