Start here
The safe first move
Move execution onto a Connection or Session and make transaction boundaries explicit. That is why honest tooling buckets engine.execute(...) as manual review.
Stop before automation when: Choosing Connection versus Session. Raw SQL that needs text(...).
Target shape
from sqlalchemy import text
with engine.connect() as conn:
result = conn.execute(text("SELECT id FROM users"))
rows = conn.execute(stmt).fetchall()