You of course cannot ignore current valuation but at the same time, if you want to own the best companies in the best sectors, you will pretty much ALWAYS have to pay up for it. It's not too often when you can buy a great company with big growth under a P/E of 20. Hell even 30. Especially in recent years with how low the 10 year has been.
And while yes, one could easily list 50 companies with high valuations that are no longer around, one could also list 50 companies that have had high valuations for awhile and are still going strong. Eventually though, yes, high valuations cannot continue forever. Just doesn't happen. Even so, I would just about always rather own higher P/E, quality companies (not all REALLY high P/Es) with good growth versus lower P/E, stagnant companies. GM is a poster child for that. IBM and XOM are a few others. For many years, GM had a P/E under 10 and did absolutely nothing. It's done better as of late but it has been dead money for the last decade. With that said, that might change in a big way if their push into EVs pans out.
Diversification and positioning is of course a big factor too. A person should never have a portfolio full of high P/E stocks. Even if you have 20 stocks but they're all high growth and high priced, you will get pummeled in major pullbacks or bear markets.
My biggest point is that if you solely rely on P/E, you are severely limiting yourself.