I‘m considering to buy a Time Capsule to work as time machine and back up device
Unfortunately, Time Machine has not been all that reliable over the past few operating systems....Sierra and High Sierra. The jury is out on Mojave, so a definitive answer is not really possible. Frankly, I would not recommend Time Machine to a Time Capsule as your main backup plan.
as well to be able to remotely access the drive and access the files.
You don't indicate what operating system that you are running on your Mac(s), but Apple has removed the Back to My Mac feature from Mojave, so remote access using Apple methods is no longer possible with that operating system.....unless....your network will meet a number of other requirements that might allow port mapping. In general, you would need the following:
1) A static Public IP address from your Internet Service Provider
2) A simple modem......not a modem/router or gateway type of device
3) The Time Capsule must be set up as the "main" router for your network
No guarantees that this will work here....it is one of those things that you will have to try to see if it works.
I would like to access the drive via MBP but as well using the iPad or iPhone
Unfortunately, Apple does not want you to access the Time Capsule remotely from an iPad or iPhone or even your network, so they provide no means to do what you ask. An App like FileBrowser installed on the iPhone or iPad might be able to allow remote access to the Time Capsule, but this is an "iffy" proposition at best, involving a non-secure SMB connection, which your ISP may not allow. A quick look at the FileBrowser support area reveals that this is no longer officially supported, so add another "maybe" to this potential plan.
Bottom line......consider that the Time Capsule was introduced over 5 years ago, and Apple has not offered any hardware improvements on the product since it was introduced, so the term "long in the tooth" probably applies to the Time Capsule, which Apple officially discontinued this past April.