Graph-based, dynamics-preserving reduction of (bio) chemical systems