If the other app has registered its name as a trademark, and you use the same or a similar name, you might be subject to a legal action for trademark infringement. This can result in an award of damages and/or an injunction against the continued use of the name.
If the owner of other app has not obtained a registered trade mark, the name will still have limited protections based upon proof of use, but those are much more limited and easier to overcome.
One may file to register a trademark which another entity is already using without registration. There will be an official decision to grant or refuse such registration.
As stated in the Official UK web page on trademark revocation if a registered trademark has been unused for five years or more, a proceeding may be brought to have it revoked. The name would then be free to have another owner register it (if revocation is granted).
Evidence of actual sales during the five year period will often prevent revocation. The official guidance strongly advises asking the trademark holder to surrender the trademark before filing a revocation action. There is a fee of 200 pounds for filing such an action, and there are likely to be additional costs and legal fees.
The UK is a "first to file" jurisdiction, meaning that the person or firm that first files for use of a particular trademark is generally awarded that mark, regardless of the prior use by another applicant. This and much else is described in the article "Understanding United Kingdom Trademark Law" from Gerben IP. See also the Wikipedia article "United Kingdom trade mark law" and the official UK page "Trade marks: detailed information" which links to many other UK Government pages on the subject.
Once a trademark has been registered, the owner must take reasonable steps to defend it, sending cease-and-desist letters or filing legal actions as needed. An owner that fails to do this may be deemed to have abandoned the trademark, and lose the registration.
As a comment says, online app stores may be unwilling to list a second app with an identical or even a very similar name. If the new app has obtained a registered trademark, that might indue the stores to list it, but they are not legally required to do so. If the existing app is not being supported, that may influence the decision of the stores, but they are not required to monitor this, or even consider it.
A would-be trademark holder would be wise to consult a qualified trademark lawyer or other expert.