How can I create a AES-256 bit image using Automator?
You don't need Automator to do this. Just use Automators cousin, AppleScript. 


Open Script Editor in /Applications/Utilities
Copy and Paste the code below
Go to File>Export 
File Format: Application
Drag files and folders onto the icon (you can even add the icon to the doc for easy access
Enter your password 
Files will be created in the same directory with an added _EncryptedDMG.dmg


Code:

on open myFiles
    set theCount to 1
    display dialog "Enter the password to encrypt" default answer "" with hidden answer
    set myPassword to the text returned of the result as text
    set d to "•"
    set td to ""
    repeat length of myPassword times
        set td to td &amp; d
    end repeat
    display dialog "Verify the password: " &amp; td default answer "" with hidden answer
    set theVerify to the text returned of the result
    if myPassword is theVerify then
        tell application "System Events"
            repeat with myFile in myFiles
                set myPath to the POSIX path of myFile
                set myName to the characters 1 thru ((offset of "." in (name of myFile as text)) - 1) of (name of myFile as text)
                set myContainer to (the POSIX path of (container of myFile))
                do shell script "printf  \"" &amp; myPassword &amp; "\" |  hdiutil create -encryption AES-256 -stdinpass -srcfolder '" &amp; myPath &amp; "' '" &amp; myContainer &amp; "/" &amp; myName &amp; "'"
                do shell script "mv '" &amp; myPath &amp; "' ~/.Trash"
                display notification "File created at " &amp; myContainer &amp; "/" &amp; myName &amp; ".dmg. Original file deleted." with title "Encryption Complete" subtitle "File " &amp; theCount &amp; " of " &amp; (length of myFiles) sound name "glass"
            end repeat
        end tell
    else
        display dialog "Error: Passwords did not match"
    end if
end open


If you would like to add to context menu copy and paste the following code in to a "Run Apple Script" Action. 

on run {myFiles, parameters}
    set theCount to 1
    display dialog "Enter the password to encrypt" default answer "" with hidden answer
    set myPassword to the text returned of the result as text
    set d to "•"
    set td to ""
    repeat length of myPassword times
        set td to td &amp; d
    end repeat
    display dialog "Verify the password: " &amp; td default answer "" with hidden answer
    set theVerify to the text returned of the result
    if myPassword is theVerify then
        tell application "System Events"
            repeat with myFile in myFiles
                set myPath to the POSIX path of myFile
                set myName to the characters 1 thru ((offset of "." in (name of myFile as text)) - 1) of (name of myFile as text)
                set myContainer to (the POSIX path of (container of myFile))
                do shell script "printf  \"" &amp; myPassword &amp; "\" |  hdiutil create -encryption AES-256 -stdinpass -srcfolder '" &amp; myPath &amp; "' '" &amp; myContainer &amp; "/" &amp; myName &amp; "'"
                do shell script "mv '" &amp; myPath &amp; "' ~/.Trash"
                display notification "File created at " &amp; myContainer &amp; "/" &amp; myName &amp; ".dmg. Original file deleted." with title "Encryption Complete" subtitle "File " &amp; theCount &amp; " of " &amp; (length of myFiles) sound name "glass"
            end repeat
        end tell
    else
        display dialog "Error: Passwords did not match"
    end if
end run


When opening Automator select Context Menu and then select these settings



Note: You  will be happy to hear, macOS Mojave will bring similar functionality natively. There is a add password in context menu that zips and encrypts the file similar to how this application does it, but still there is not progress bar.

Note[2]: This script will not worked if the folder contains locked files (File>Info>Locked).