Generally an Apple device that fails to charge can be caused by a few issues.
- Charging cord
- Charging port
- Logic board circuitry
I assume you've eliminated the first two items at the Apple store since they probably used their own charger and cord to test your iPad. You've done as much as possible with the charging port by cleaning it, so really the next most likely cause is the battery itself. After four years it's quite likely the battery has reached the end of its life, so it's probably the Apple store was correct in their diagnosis.
That's really going to be the only part you can fix yourself. The charging port itself is mounted on a flex cable that is soldered on the logic board, so it takes specialized equipment and expertise to replace that port if it turns out to be the problem. Here's a guide that will take you step by step through the procedure for replacing your battery.
Drums iPad 7 (2019) repair - Free guide - SOSav
There are a couple of idiosyncrasies with the French site; the translation for "battery" comes across as "drums", and whenever they talk about a flex cable, it appears in the text as a "tablecloth". Other than that, the guides are well written and easy to follow.
Here's a picture from that same site that shows the charging port on the end of that flex cable attached to the motherboard.