That sounds like a solid advice!! Thanks for pointing it out!! What if they reject me there too? What is the plan B in this situation?
If you are a good programmer, avoiding areas that are too hot (e.g. ML) and focusing on things that can make best use of your skills (e.g. compilers, verification) could be a good idea.
Research assistant positions are also great a backdoor to PhD offers, in case you are interested in that.