I know this is an older topic, but for anyone else who stumbles across this:
The current supported way to do this is using the "SQLALCHEMY_ENGINE_OPTIONS"
config flag for Flask-SQLAlchemy
For example, to set the pool configuration in the original question, you would add the following to your config file:
SQLALCHEMY_ENGINE_OPTIONS = {'pool_size': 20, 'max_overflow':0}
See also https://docs.sqlalchemy.org/en/20/core/pooling.html (or for SQLAlchemy 1.4, https://docs.sqlalchemy.org/en/14/core/pooling.html)