Aside from getting scammed or how ever you want to put it, investing at the top is always a wrong decision, if you find a coin, any coin at all, not just a meme coin pumping, and after doing your research (very important first stop), you are convinced that the coin or meme coin will do more Xs in the future, what to do is wait for a correction, every coin pumping must at some point come down, and when the price of such coin drops, it the time to ape in, and do not go all in at ones, reserve some funds just incase after you bought, the coin keeps dipping, you can use DCA strategy to accumulate the coin as it deeps further, until it starts coming up again.
And for the records, investor won't get scammed investing in meme coins like Shiba inu, Doge coin, pepe, Floki, Coq inu and so on, since this meme coins have proven their legitimacy in the crypto industry, they have proven that they can be trusted.
The only thing that can happen is that, investors may likely lose money if they fomo and invest in those coins when they are at the top or peak of their price.