Invest in apartment? (Melbourne)

Hello everyone, just coming to ask for some advice from different sources

26 years old and I am thinking about buying a second IP, first one being a cookie cutter house in the suburbs with a friend.

The house is costing a lot in mortgage repayments, but I understand the capital gains in the long run will outweigh the current costs (Hopefully)

So for my second investment I was thinking of diversifying my portfolio and purchasing an apartment, which will give me no capital gains but a very high rental yield

I am thinking of buying a 1 bedroom apartment (Highest rental yield) in an area like Carlton or somewhere similar where I would hopefully have constant tenants, and hold onto my investment for 20+ years

Before I finish I would like to clarify I was a Real Estate agent for many years and always thought apartments were unfairly seen as bad investments. Most the time it was because the landlord had purchased 2 or 3 years earlier, paid stamp duty + other fees, then decided to sell (paying agent fees) and wondered why they didn't come out positively in costs..

So this brings me to the reason I am posting this, in my head it makes sense, buy an apartment with a high rental yield. Enjoy the increased cashflow for 25+ years then eventually sell many years after its paid itself off.

BUT before I do this I am asking YOU Aus finance, if I am missing a vital bit of information turning this investment into financial suicide. If this is the case please let me know in the comments haha